Repository navigation
Inherit approval policy from the user's Codex config - #806
Open
AzmainMahatab wants to merge 1 commit into
Open
AzmainMahatab wants to merge 1 commit into
AzmainMahatab wants to merge 1 commit into
Conversation
Thread start and resume sent `approvalPolicy: "never"` whenever the caller passed nothing, which overrides `approval_policy` / `approvals_reviewer` in ~/.codex/config.toml and makes Codex auto-review unreachable from the plugin. Send null instead so the app-server resolves both from config, matching how `model: null` already falls back to the configured model. Approval requests that do reach the plugin are still answered with the existing unsupported-request error, so they are denied rather than left waiting. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 8, 2026
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Summary
buildThreadParams/buildResumeParamsfall back toapprovalPolicy: "never"whenever the caller passes nothing, and no caller passes one. That overridesapproval_policyandapprovals_reviewerfrom~/.codex/config.toml, so Codex auto-review ("Approve for me",approvals_reviewer = "auto_review") can never run for plugin tasks or reviews: withnever, Codex has nothing to escalate and nothing to review (#445).Change
lib/codex.mjs:options.approvalPolicy ?? "never"→options.approvalPolicy ?? nullin both builders, so the app-server resolves the approval policy and reviewer from config — the same mechanism the plugin already uses formodel.sandbox(Hardcoded sandbox values always override config.toml sandbox_mode #482).approvals_reviewer = "user") keep hitting the existinghandleServerRequestpath, which answers-32601 Unsupported server request, so they are denied rather than left waiting. Users who never set an approval policy therefore see escalations denied instead of not attempted.Verification
tests/approval-policy.test.mjs:task,task --write,reviewandadversarial-reviewall sendapprovalPolicy: null(the fake fixture now records the value). All four fail onmainwithactual: 'never'.sandbox_mode = "workspace-write",approval_policy = "on-request",approvals_reviewer = "auto_review": a plugin task wrote outside the workspace and reached the network afterrequire_escalatedrequests thatcodex-auto-reviewapproved; Codex logged the thread asapproval_policy=OnRequest sandbox_policy=WorkspaceWrite. Onmain, the same task cannot escalate.Related: #445, #482, #646, #494, #426
🤖 Generated with Claude Code