Repository navigation
fix: follow the Codex approval policy and drop the approvals option - #3
Merged
Merged
Conversation
The approvals option offered three ways to answer Computer Use's "Allow Computer Use to use <app>?" prompts, but OpenCode's plugin API cannot show those prompts to the user, so every mode was a workaround: accept-session approved everything and decline broke the plugin. App access now always follows the Codex approval_policy and the approvals stored in ChatGPT/Codex. A prompt Codex forwards is declined with a note that names the app and tells the user how to allow it. /computer-use-doctor reports the effective policy. A leftover approvals setting is ignored with a warning.
deny hides the tools; ask does not prompt yet for external plugin tools (anomalyco/opencode#50652). Link the plugin permission API PR that will let app prompts appear in OpenCode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The
approvalsoption offered three ways to answer Computer Use's "Allow Computer Use to use App?" prompts, but OpenCode's plugin API cannot show those prompts to the user (plugins can list, read and reply to permission requests, not create them). Every mode was a workaround:accept-sessionapproved everything,declinemade the plugin unusable, andcodexdeclined forwarded prompts silently.App access now always follows the Codex
approval_policyand the approvals stored in ChatGPT/Codex:/computer-use-doctorreports the effective policy (read with the app-server'sconfig/read).approvalssetting is ignored with a warning instead of failing.Once OpenCode lets plugins raise permission requests, these prompts can become OpenCode permission questions.
How I tested it
bun run check(43 tests, including the actionable decline note,config/readparsing and the removed option).bun run doctoragainst the real engine on macOS 26.6.2: reportsapproval_policy = "never".Checklist
bun run checkpasses