Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): full access no longer asks to approve commands and patches #38783

Closedshoutez(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/38783/headopened View on GitHub

Problem

A Codex thread in Full access still stops for approvals. Example: a delegated Codex reviewer ran a shell command containing trap 'rm -rf "$test_dir"' EXIT, and T3 showed "Approval needed" for it. The turn waited until the user clicked Approve.

This is a regression from #37104. For MCP prompts to reach T3, Full access moved Codex from approvalPolicy: "never" to a granular policy. Under granular, Codex's own checks can still raise item/commandExecution/requestApproval and item/fileChange/requestApproval. A command Codex judges dangerous, such as rm -rf, is one of these. T3 auto-accepts MCP elicitations in Full access but not these two, so they reach the user. Every other provider treats Full access as no prompts (Cursor, OpenCode, Kiro).

Expected: Full access never asks the user to approve a command or patch.

Change

The command and file-change approval handlers in CodexAdapterV2 answer accept themselves when the turn is Full access and has no explicit approvalPolicy or sandboxPolicy override. The MCP elicitation handler already does this. An explicit override still sends prompts to the user, as do the supervised modes. The turn policy sent to Codex does not change, so the browser and app access fix from #37104 is unaffected.

Scope

A small fix for a regression in #37104 with a concrete reproduction above, so I did not open a separate issue.

Verification

  • New test accepts command and patch approvals in Full access without asking. It replays a Full access turn in which Codex requests approval for an rm -rf command and for a patch. The test expects T3 to answer accept on the wire and emit no runtime_request.updated. It fails without the source change (times out waiting for a prompt) and passes with it.
  • Two file-change approval tests (answers without waiting for late paths… and matches file paths to items approved out of order) drive the user's prompt. They ran in the default Full access policy, so they now start in auto-accept-edits, which is the supervised path they test.
  • The whole CodexAdapterV2.test.ts passes (205 tests). node scripts/check-changed.ts passes format, lint, knip, graphql, typecheck and tests.
  • Not checked: a manual run in the desktop app with this build.

Code written by Claude Opus 5.5 (Claude Code).

🤖 Generated with Claude Code

    1. Pushedf1fcef3

    2. Evidence

      In the web client, use authenticated Codex 0.169.0 with GPT-6-Luna, Medium reasoning, Full access, and no command rules or explicit policy overrides. Submit: Execute the shell command rm -rf ./absent-repro-target exactly, then report its exit code. Do not approve anything. Both sides use fresh isolated app state, a synthetic scratch project, Chromium at 1280×800 CSS pixels, and light theme.

      BeforeAfter
      ba640037e8f1fcef3845
      Recording: Waiting for approvalRecording: Exit code 0, no approval

      Seed script · Reproduction instructions

      Not shown:

      • Patch approval requests were not exercised; the supplied reproduction triggers a command approval.
      • Browser/app elicitations and explicit policy overrides were not exercised; this proof covers the default Full access command path.
      • The trap-cleanup variant was not run; both commits received the exact absent-target command from the reproduction.
    3. juliusmarminge added labelstakeover:needs-julius

    4. juliusmarminge removed labelstakeover:in-progress

    5. Thanks for this. #39187 makes the same change and is the one being kept.

      #39187 fixes the same command and patch approval regression, while distinguishing ordinary approvals from terminal input, managed-network requests, and grants for broader write access. This change accepts those requests indiscriminately under the default Full access policy.

      Your command reproduction and the requirement to respect explicit policy overrides remain covered by the retained fix, which also adds regression coverage for those request distinctions.

      Closing as a duplicate.

    6. juliusmarminge closed this

Sign in to join this conversation.