Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

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

  1. 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.
  2. 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.
  3. 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.
  4. Use the in-session toggle only for the project in front of you. Press mod+shift+a in 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.
  5. Put deny rules in the project config for anything that must never run. Auto-accept and the permissions array in opencode.json are separate mechanisms. A deny rule in the project config is what stops an action outright — for example, denying git push * under the shell action, 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.
  6. 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

What can go wrong

Limits

Related playbooks

Sources

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