Codex: error: unexpected argument '--full-auto' found

Codex removed the --full-auto flag. The exact message, why Codex prints it, and the fix.

Updated November 23, 2026 · Checked against Removed from the interactive CLI and deprecated in `codex exec` by PR #20133 (April 2026); removed from `codex exec` by PR #36054 (July 2026). Reported on codex-cli 0.154.0., reproduced in EnvHaven 1.9.0

The message

error: unexpected argument '--full-auto' found

What it means

Codex removed the --full-auto flag. The interactive CLI dropped it in April 2026 and codex exec stopped accepting it in July 2026, so scripts and wrappers that still pass it fail before Codex starts.

Fix

  1. Replace --full-auto with --sandbox workspace-write for unattended runs that only edit the workspace.
  2. Or use --approve-for-me (alias --not-so-yolo) to route approval requests through automatic review with the workspace-write sandbox.
  3. Only inside a container or VM that is already isolated, use --dangerously-bypass-approvals-and-sandbox (alias --yolo).

In an EnvHaven workspace

No: EnvHaven has built-in support for Codex, on the PATH in every workspace.

Where this comes from

This message was produced by Codex (Removed from the interactive CLI and deprecated in codex exec by PR #20133 (April 2026); removed from codex exec by PR #36054 (July 2026). Reported on codex-cli 0.154.0.) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.