OpenCode adapter treats runtimeMode: auto as approval-required (inconsistent with Claude)
Summary
With a thread in Auto runtime mode, the OpenCode provider asks for approval on every bash/edit/external-directory action. The Claude provider does not ask in the same mode. The OpenCode session ruleset is built by T3 and overrides the user's global opencode.jsonc permission config, so it can't be fixed from user config.
Expected
auto behaves the same across providers: no approval prompts (equivalent to Claude's bypassPermissions). Only approval-required (and auto-accept-edits for edits) should prompt.
Actual
In the bundled app code, openCodePermissionRules computes:
requiresApproval = runtimeMode !== "full-access"
so auto produces session rules with ask for bash, edit and external_directory. Only full-access yields allow *.
Other providers, from the same bundle:
| Provider | runtimeMode: auto |
|---|---|
| Claude | bypassPermissions, no approval callback installed |
| Antigravity | only approval-required blocks (adapter not fully read, least certain) |
| OpenCode | ask rules, approval requested |
Repro
- Create a thread with provider OpenCode, agent
build, runtime modeAuto. - Add
"permission": { "bash": "allow" }to the global OpenCode config. - Ask the agent to run any shell command.
- An approval prompt appears. Running the same OpenCode setup outside T3 does not prompt.
- Switching the thread to
Full accessremoves the prompts.
Suggested fix
Make requiresApproval true only for approval-required (and treat auto-accept-edits as allow for edits), matching the Claude adapter. Otherwise, document that auto means "ask" for OpenCode.
Workaround
Use Full access on OpenCode threads.
Duplicate of #11458, which tracks OpenCode Auto mode injecting approval rules over configured permissions, prompting for routine shell/tool calls while Full access removes the prompts. Keeping the reports together there.