Skip to content

feat(app): per-project auto-accept permissions overriding a default - #54839

Merged
Brendonovich merged 2 commits into
devfrom
auto-accept-scope
Oct 13, 2026
Merged

Brendonovich merged 2 commits into
devfrom
auto-accept-scope

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After #44608, auto-accept permissions became one app-wide switch. This PR keeps that switch as the default and adds a per-project override in project settings.

  • Settings → Preferences → Auto-accept permissions (switch): the default for every project. Copy: "Approve permission requests without asking. Projects can override this in their settings."
  • Settings → Projects → (project) → Auto-accept permissions (dropdown): Use default (On/Off) / On / Off. Copy: "Approve this project's permission requests without asking".

A project uses its own choice when it has one and the default otherwise, so it can opt in while the default is off, or opt out while it's on.

Details

  • Overrides are keyed by server scope + project ID, since project IDs are only unique per server. They're stored in settings.v3 as permissions.autoApproveProjects; a project with no entry uses the default. Existing autoApprove: true users keep their default on.
  • From a session, the mod+shift+a command now sets the current project's choice. If the new value matches the default, the project goes back to using the default. Copy: "Auto-accept permissions for this project", toast "Auto-accepting permissions for this project".
  • The per-server auto-approver replies only for covered projects. For a request from a session the client hasn't loaded, it fetches the session first to find its project. Permission docks and tab attention dots are hidden only for covered projects.
image image

Tests

  • bun run typecheck (packages/app)
  • bun run test:unit (packages/app): 749 pass
  • Playwright on this branch, settings, settings-search, session-request-docks, multi-server and command-palette: 60 pass
  • New multi-server case: with the default off, setting a project to On approves only that project's request. A project set to Off keeps prompting after the default turns on, then is approved once it goes back to "Use default (On)". The case fails if the approver ignores project overrides.

Requested by: @Brendonovich (Brendan via Slack)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I ran typecheck and test:unit in packages/app (749 pass) and the multi-server, settings and session-request-docks Playwright specs against this branch (40 pass, including the new per-project case). Screenshots of the Preferences row on the base and on this branch are below.

Public API: unchanged. The only addition is the client-local permissions.autoApproveProjects entry in the app's settings.v3 store. It is backwards compatible: existing autoApprove: true settings still mean "All projects".

No blocking concerns.

Before

After

@opencode-agent opencode-agent Bot changed the title feat(app): scope auto-accept permissions to a project or all projects feat(app): per-project auto-accept permissions overriding a default Oct 13, 2026
@Brendonovich
Brendonovich merged commit b8f925e into dev Oct 13, 2026
13 checks passed
@Brendonovich
Brendonovich deleted the auto-accept-scope branch October 13, 2026 06:16
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.

1 participant