Playbooks · Coding tasks
Set OpenCode auto-accept per project, not for every project
Written October 31, 2026
For an OpenCode user who wants permission prompts skipped in one throwaway project and kept in every other project: leave the default off, then turn auto-accept on for that one project in the Desktop or web app settings. The choice lives in the app, not in a config file, and it does not carry over to the terminal client or to headless runs.
What auto-accept does
OpenCode asks before an action when a permission rule resolves to ask. Auto-accept answers those requests without asking. It does not rewrite the rules: an action a rule allows still runs, an action a rule denies still does not run, and only the requests that would have waited for a decision are approved. OpenCode's permissions guide sets out the rule order — the last matching rule wins, and a rule that matches nothing falls back to ask — so auto-accept is only as safe as the rules underneath it. The per-project choice arrived in version 2.0.28, on 13 October 2026, as a setting that overrides the default for one project.
Before you start
Pick the project that will carry the risk: an empty folder or a copy of a project, with no credentials and nothing you cannot afford to lose or rebuild. Auto-accept removes the prompt, not the action — edits and shell commands still happen, only without a pause first. Decide the default before touching any project: if the default is on, every project without its own choice auto-accepts, including the next project you open. The safe starting position is default off, with one project turned on deliberately.
Steps
- Set the default to off. In the Desktop or web app, open Settings, then Preferences, and set Auto-accept permissions off. The copy in the app describes this as the default for every project, with projects able to override it in their own settings. With the default off, a project with no override keeps asking.
- Turn one project on. Open the project, open Settings, then Projects, and set Auto-accept permissions for that project to On. The choice for a project is one of four: Use default (On), Use default (Off), On, or Off. Choosing On or Off fixes that project regardless of the default; choosing a Use default value hands the decision back to the default, showing what the default currently is.
- Check the neighbouring project. Switch to a second project and open its project setting. It should still show the default, not the choice made for the first project. If it shows On where you did not set it, the default is on — go back to step 1 and turn the default off before continuing.
- Use the in-session toggle only for the project in front of you. Press
mod+shift+ain a session, or run the command Auto-accept permissions for this project, to set the current project's choice. If the new value matches the default, the project goes back to using the default instead of holding its own choice. Check the project setting afterwards: the dropdown is the record of what is set, not your memory of the key press. - Put deny rules in the project config for anything that must never run. Auto-accept and the
permissionsarray inopencode.jsonare separate mechanisms. A deny rule in the project config is what stops an action outright — for example, denyinggit push *under theshellaction, the pattern the permissions guide uses. The config guide lists project config files and their merge order; the published config schema carries no auto-accept key, so do not expect a config entry to reproduce the app setting. - Turn the project back when the throwaway work is done. Set the project to Off, or to Use default if the default is off, and confirm the dropdown shows the new value. Leaving a project set to On after its throwaway purpose ends is how a later, careless session inherits skipped prompts.
What does not carry the setting
- Config files. There is no auto-accept key in
opencode.json. The config schema'spermissionsfield holds ordered allow, deny, and ask rules, and nothing else in the schema switches auto-accept on or off. Adding a guessed key to a config file changes nothing. - The terminal client settings file. Terminal client settings live in one global
cli.jsonfile, and the CLI settings guide states there is no project-local copy. Itssession.permissionsvalue is a single global choice,promptorautoaccept, for every project opened in the terminal. - The
--autoflag. Starting OpenCode with--auto, or runningopencode run --auto, auto-approves permission requests for that invocation only. It is not stored, it is not per project, and it does not change the app setting in either direction. - Saved
Allow alwaysapprovals. Choosing Allow always on a prompt saves durable, project-scoped allow rules for the patterns the tool proposed. Those saved approvals are a different mechanism from auto-accept: they stay in place when auto-accept is turned off, and they never override a configured deny. Review broad saved approvals separately, and do not rely on turning auto-accept off to undo them.
What can go wrong
- Leaving the default on. A new project inherits the default. The failure shows up as a session that never prompts, in a project nobody deliberately set. Set the default off first, and check it again after any change to a single project.
- Assuming the terminal follows the app. A project set to On in the app still prompts in the terminal client unless the terminal's own global setting or the
--autoflag says otherwise, and a project set to Off in the app still auto-accepts in a terminal started with--auto. The two clients keep separate settings; check the client you are actually sitting in. - Trusting the toggle without reading the dropdown. The in-session toggle sets the current project's choice, and a value that matches the default removes the project's own choice. Either way, the dropdown in the project settings is the only reliable record. Read it after toggling.
- Removing and re-adding a project. Overrides are keyed to the project as the app identifies it, by server and project. A project removed and added again may not carry its old override. Check the setting after re-adding, rather than assuming the old choice survived.
- Auto-accepting in a project with real credentials or irreplaceable files. Skipped prompts remove the last pause before an edit or a shell command runs. Keep auto-accept on throwaway work only; in a live project, keep prompts on and use narrow allow rules for the routine commands instead.
Limits
- Checked in OpenCode 2.2.5, installed on 31 October 2026 into two empty throwaway folders with no credentials: the published config schema carries no auto-accept key; the terminal settings schema carries one global
session.permissionsvalue; the served app bundle carries the per-project settings store — default off, per-project overrides, fallback to the default — together with the project-settings labels quoted above. The app bundle is the same code the Desktop and web clients use for these settings. - No live session with a model was run, and the Desktop app was not driven, so approval behaviour in a live session was not observed in this check. The per-project behaviour is described from OpenCode's changelog and the change that added it, which records a multi-project approval test: with the default off, a project set to On is approved while another project keeps prompting, and a project set to Off keeps prompting after the default is turned on until it returns to using the default.
- Menu names follow the changelog and the change description. If a later version renames Settings, Preferences, or Projects, the labels — Auto-accept permissions, Use default (On/Off), On, Off — are the values to look for.
Related playbooks
- OpenCode 2.2.7: Copilot Auto and breaking changes
- Antigravity CLI 1.5.4: ACP Auto mode
- Antigravity CLI 1.5.7: Auto becomes the default
- Claude Code 2.1.328 makes auto mode the cloud default
Sources
- https://github.com/anomalyco/opencode/blob/dev/CHANGELOG.md
- https://github.com/anomalyco/opencode/pull/54839
- https://dev.opencode.ai/v2/docs/permissions
- https://dev.opencode.ai/v2/docs/config
- https://dev.opencode.ai/v2/docs/cli/config
- https://opencode.ai/config.json
- https://opencode.ai/v2/cli.json
Back to: Coding playbooks hub · Also: Move OpenCode 1.x to 2.0 without losing config · Open a repository you did not write without running its code