Skip to content
Source
Sign inSign up
pingdotgg/t3code

Codex Auto mode rejects every rm -f / rm -rf, even in the workspace and /tmp #25640

Openjuliusmarminge opened this issue 2 comments
juliusmarmingecommented

What happened

Codex leads running in T3's Auto mode can't delete files. Every rm -f / rm -rf, including under /tmp and the lead's own worktree, is rejected with:

rm -f style commands are not permitted. Use a safer approach

Leads then delete with python -c 'shutil.rmtree(...)', which is allowed, so the rule doesn't protect anything and costs a turn each time. Some leads with a strict brief stop instead: e.g. "TAKEOVER_BLOCKED 24268 cleanup-command-rejected" (PR dispatcher, 2026-10-24T03:38Z, "Automatic command review rejected cleanup because 'rm -f style commands are not permitted.'").

Counts from a fleet audit of agent friction logs: 212 lines across 143 issues/PRs since 2026-10-21, rising (67 on 10-25, 45 on 10-26). Latest 2026-10-26T21:28Z.

Which component rejects it

  • The text is in the Codex binary (codex-cli 0.145.0, core/src/exec_policy.rs, built-in default.rules), not in T3.
  • T3 reaches it through its Auto-mode mapping. codexRuntimeModeTurnDefaults("auto") sends approvalPolicy: "on-request", approvalsReviewer: "auto_review", sandboxPolicy: workspaceWrite. Codex's automatic reviewer then applies that rule. Full access (approvalPolicy: "never", dangerFullAccess) doesn't use the reviewer.

Expected

Deleting files inside the workspace or /tmp works in Auto mode, the same as writing them. Either T3 passes an exec-policy rule/override that allows it, or it doesn't route that case to the auto reviewer. If T3 keeps the rule, it should be documented for Auto mode so agents know the alternative.

Where

apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts:709-716 (origin/main fe507c5a1e), the "auto" branch of codexRuntimeModeTurnDefaults.

  1. juliusmarminge added labelsbug

  2. Tested the real web app on main at 451bb459f1, Linux, Codex Auto mode. With Codex 0.163.0, separate rm -f /tmp/t3-issue-25638-repro/file and rm -rf /tmp/t3-issue-25638-repro/subdir calls both exited 0. Installed 0.145.0, restarted the server, and confirmed 0.145.0 in the app-server handshake: the same commands, plus equivalent deletions under the worktree, all exited 0 with no output. The wire log confirms approvalPolicy: on-request, approvalsReviewer: auto_review, and sandboxPolicy: workspaceWrite.

    Please provide one rejected tool-call payload, including the command, working directory, and sandbox permission arguments, plus the relevant exec-policy rules/configuration (omit secrets). That should distinguish the failing review path from these successful calls. Current main also warns that 0.145.0 is known broken and recommends >=0.159.0.

    Codex 0.145.0 Auto mode: all four deletion commands exited 0

  3. juliusmarminge added labelsneeds more info

  4. Additional observation: cleanup from the outer triage session did return the exact rejection, before the shell command ran: exec_command failed: CreateProcess ... rejected: rm -f style commands are not permitted. Use a safer approach. The isolated app-server sessions above accepted the same command forms. The rejected call was tools.exec_command invoked through functions.exec; please include that tool-routing detail with a failing payload so we can reproduce the same execution path rather than changing Auto mode globally.

  5. github-actions[bot](GitHub profile, opens in a new tab) removed labelsneeds more info

Sign in to join this conversation.