fix-codex-chat

Fix: codex chat agent must bypass permissions like claude does

Metadata

Statusdone
Assignedagent-1092
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-29T12:26:03.718527490+00:00
Started2026-04-29T12:27:00.409533563+00:00
Completed2026-04-29T12:53:02.520102754+00:00
Tagspriority-high,bug,codex,chat, eval-scheduled
Eval score0.92
└ blocking impact0.95
└ completeness0.95
└ coordination overhead0.90
└ correctness0.95
└ downstream usability0.90
└ efficiency0.85
└ intent fidelity0.92
└ style adherence0.90

Description

Description

User report: codex chat agent in the wg TUI hits permission prompts trying to run wg status, blocking it from doing its job. Screenshot shows the codex agent asking the user to approve commands one-by-one with sandbox/network-namespace warnings.

User quote: 'it probably needs to run in --yolo in cwd. or however claude is run. otherwise we are trapped by permissions issues. ... codex is not working as well as claude as you can see. it cant even see wg'

The claude CLI handler passes --dangerously-skip-permissions (or equivalent) when spawning chat agents — that's why claude chats can run wg commands inline. The codex CLI handler isn't passing the equivalent flag.

Goal

Make codex chat agents run with the same bypass-permissions / sandbox-disabled posture the claude handler uses. The user invoked the chat agent from their own terminal session — they've already authorized its actions implicitly.

What to find / change

  • Codex CLI flag for bypass: likely --full-auto or --yolo or --dangerously-bypass-approvals (check codex --help for the actual name as of CLI 0.125.0+)
  • Code location: wherever the codex handler builds the codex command line (search for Command::new("codex") or similar in src/dispatch/ or src/handlers/)
  • Mirror what the claude handler does: it passes the dangerously-skip-permissions flag for chat agents AND for worker agents that need to run shell commands

Validation

  • Failing test written first (TDD): launch a codex chat agent, have it try to run wg status. Pre-fix: permission prompt. Post-fix: command runs without prompt.
  • Codex chat in the TUI can run wg status, wg add, wg show, wg log without permission prompts
  • Same posture applied to codex WORKER agents (not just chat) so worker agents that need shell access aren't blocked either
  • Verify the chosen flag is the CURRENT codex CLI's bypass flag (cite codex --help output in task log to prove it)
  • Symmetry check: claude vs codex handler should pass equivalent flags. List both flag strings in the task log so future audits are easy.
  • cargo build + cargo test pass
  • Permanent smoke scenario added: spawn a codex chat agent, run a wg command, assert no prompt
  • cargo install --path . was run before claiming done

Depends on

Required by

Log