Skip to content

feat(app): auto-approve permissions per server#33994

Draft
opencode-agent[bot] wants to merge 1 commit into
devfrom
server-auto-approve
Draft

feat(app): auto-approve permissions per server#33994
opencode-agent[bot] wants to merge 1 commit into
devfrom
server-auto-approve

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • make Desktop auto-approve intent server-scoped instead of session/directory-scoped
  • automatically reply once to permission requests from every current or future session on the selected server
  • keep separate preferences for separate servers and preserve explicit denials
  • deduplicate responses across overlapping server-scoped provider instances
  • remove session-creation propagation and legacy lineage/directory override state

Behavior

The Settings switch and permissions.autoaccept command now control the active server. Enabling it drains already-loaded pending requests, then automatically responds to future permission.asked events. Disabling it immediately returns all sessions on that server to normal approval prompts.

This remains Desktop intent implemented through existing SDK permission replies. It does not mutate OpenCode server config, Core permission rules, sessions, or the V2 SDK, so other clients connected to the same OpenCode server are unaffected.

Validation

  • bun typecheck (packages/app)
  • bun run test:unit (packages/app): 431 pass
  • focused permission-response and prompt-submit tests: 7 pass
  • Playwright server-auto-approve.spec.ts: pass
    • enables auto-approve in one session
    • navigates visibly through Home to another session on the same server
    • verifies exactly one { response: "once" } SDK request
    • verifies no permission dock remains
    • disables auto-approve and verifies the next permission dock appears
  • focused oxlint: 0 errors (existing warnings only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants