Part of the AI Coding Harness Guide — environment design for coding agents in production.

Codex Plan Mode: How to Turn It On and Off, Plus Auto Review and Auto Mode#

Published by

Type /plan or press Shift+Tab to switch Codex CLI to Plan mode. In Plan mode Codex reads, searches and asks you questions, then proposes a plan, but it does not edit files. To leave, press Shift+Tab again or pick "Yes, implement this plan". Auto review is a separate setting: approvals_reviewer = "auto_review" in config.toml.[1][2]

What Plan mode is#

Plan mode is one of two collaboration modes in the Codex TUI: Default and Plan. Each mode adds its own instructions to the turn. The Plan instructions tell the model to work in three phases (explore the repo, agree on intent, agree on the implementation), to prefer the request_user_input tool for multiple-choice questions, and to end with a <proposed_plan> block that is "decision complete", so the implementer has no decisions left. Reading files, searching, static analysis, and tests or builds that write only to caches are allowed. Editing files, formatters that rewrite files, patches, migrations and codegen are not.[2]

Two rules are enforced outside the prompt:

  • The update_plan checklist tool returns an error in Plan mode: "update_plan is a TODO/checklist tool and is not allowed in Plan mode".
  • Automatic turns, such as /goal continuations, cannot enter or leave Plan mode. Only a turn you start can change it (v0.138.0).[4]

Plan mode does not change approval_policy or sandbox_mode. The no-edit rule comes from the mode's instructions, not from the sandbox. If you need a hard guarantee that nothing is written, also switch to Read Only in /permissions, which is what the official docs suggest for "chat or plan without making changes".[1]

How to enter and leave Plan mode#

ActionHowCondition
Enter Plan mode/planNot available while Codex is working on a turn
Enter and send a prompt/plan add retry to the upload clientInline text and pasted images are sent as the first Plan message (v0.95.0)
Switch Plan to Default, or backShift+TabOnly when no task is running and no popup is open. The key is reserved and cannot be rebound
Leave and start coding"Yes, implement this plan"Shown after a turn that produced a plan. Switches to Default and sends "Implement the plan."
Leave in a fresh thread"Yes, clear context and implement"Starts a new thread that carries only the plan, and shows how much context the planning thread used (v0.122.0)
Keep planning"No, stay in Plan mode"Closes the prompt

The "Implement this plan?" prompt does not open when follow-up messages are queued or another popup is open. A resumed session keeps the mode it was in (v0.156.0).[4]

Plan mode config#

Plan mode has no on/off key: the collaboration-modes feature flag was removed in v0.105.0, and /plan is always listed. The one setting is the reasoning effort for Plan turns. Without it, Plan mode uses medium:

# ~/.codex/config.toml
plan_mode_reasoning_effort = "high"

model_reasoning_effort still applies to Default mode. plan_mode_reasoning_effort also works inside a profile.[2]

What codex-auto-review is#

codex-auto-review is the model behind auto review (named "Guardian" before v0.122.0). Its catalog entry is "Codex Auto Review: Automatic approval review model for Codex", hidden from the /model picker. When auto review is on, an approval request that would normally stop and ask you goes to a reviewer agent on this model instead. The reviewer collects context, applies a risk-based decision framework, and approves or denies with a rationale.[2][3]

Which model reviews:

  • Signed in with ChatGPT: codex-auto-review, at low reasoning effort when the model supports it.
  • Signed in with an API key: gpt-5.6-luna.
  • If the review model is not in your model catalog, the reviewer falls back to your session model.[2]

What auto review checks#

Auto review sees only actions that already need approval. Anything your sandbox and rules already allow runs without review. The official docs list:[3]

  • shell commands that ask for escalated sandbox permissions
  • commands that match a rule with decision = "prompt", even inside the sandbox
  • network requests to destinations that need approval (an explicit deny rule still blocks)
  • file edits outside the writable roots
  • MCP and app tool calls that need approval
  • eligible Computer Use calls

It blocks exfiltration of private data, secrets or credentials to untrusted destinations, credential probing, persistent weakening of security, and destructive actions with significant risk of irreversible damage. Prompt-build, review-session and parse failures fail closed. After a denial, the agent is told to find a materially safer alternative or stop and ask you; a timeout is reported separately and is not treated as proof the action is unsafe.[1][3]

How to turn auto review on#

# ~/.codex/config.toml
approval_policy    = "on-request"
approvals_reviewer = "auto_review"

Or for one session, with either entry point:

codex --approve-for-me
codex exec --approve-for-me "fix the failing test"

--approve-for-me (alias --not-so-yolo, v0.147.0) sets approvals_reviewer="auto_review", approval_policy="on-request" and sandbox_mode="workspace-write". It cannot be combined with --sandbox, --ask-for-approval or --dangerously-bypass-approvals-and-sandbox. In the TUI, /permissions shows Approve for me ("Only ask for actions detected as potentially unsafe") under the Default preset.[2]

Auto review needs an interactive approval policy: on-request or a granular policy. With approval_policy = "never" nothing is escalated, so there is nothing to review. Changing the approval policy alone does not select the reviewer.[1][3]

How to turn auto review off#

Set approvals_reviewer = "user" (the default), or pick Default instead of Approve for me in /permissions. The legacy value guardian_subagent is still accepted as a synonym for auto_review. An administrator can restrict the allowed values with allowed_approvals_reviewers in managed requirements.[2][3]

Auto review settings#

[auto_review]
timeout_ms = 90000            # whole review budget; 0 = no deadline
policy = "Never approve pushes to main."
KeyDefaultEffect
approvals_reviewer"user""auto_review" routes approval requests to the reviewer
[auto_review] timeout_ms90,000 msReview budget including setup and retries; 0 waits with no deadline
[auto_review] policyModel or bundled policyExtra policy text added to the reviewer prompt; a managed guardian_policy_config takes precedence
[auto_review] conversation_history_max_output_tokens4,000Maximum estimated tokens per history-tool response the reviewer reads
[features] guardian_approvaltrue (stable)Shows Approve for me in /permissions

When auto review stops the turn#

For most models, the turn is interrupted after 3 consecutive denials, or after 10 denials within the last 50 reviews. For models designated for cybersecurity, the first denial interrupts. Any other review outcome resets the consecutive count. /approve opens the recent denials (up to 10 per task) and lets you approve one denied action for one retry; the retry still goes through auto review.[2][3]

Codex auto mode: approval_policy and sandbox_mode#

"Auto" is the docs' name for the default permission preset. In the /permissions picker it is labeled Default (preset id auto). The three built-in presets in v0.169.0:[1][2]

Presetsandbox_modeapproval_policyWhat Codex can do without asking
Read Onlyread-onlyon-requestRead files in the workspace
Default (Auto)workspace-writeon-requestRead and edit files in the workspace and run commands; asks for network access and edits elsewhere
Approve for meworkspace-writeon-request + approvals_reviewer = "auto_review"As Default, but the reviewer answers approval prompts
Full Accessdanger-full-accessneverEdit outside the workspace and use the network, no prompts
# Auto, written out
sandbox_mode    = "workspace-write"
approval_policy = "on-request"

[sandbox_workspace_write]
network_access = false   # default: network off

Valid values in v0.169.0:

  • approval_policy: on-request (default), never, or { granular = { ... } } with the keys sandbox_approval, rules, mcp_elicitations, request_permissions, skill_approval. untrusted was retired in v0.149.0, and on-failure is read as on-request. On the command line, -a/--ask-for-approval takes on-request or never.
  • sandbox_mode / -s/--sandbox: read-only, workspace-write, danger-full-access.[1][2]

With no sandbox_mode set, a directory that has a trust decision gets workspace-write; otherwise the default is read-only, and the docs note Codex may start in read-only until you trust the directory. .git, .agents, .codex and .aws stay read-only inside writable roots.[1][2]

What happened to --full-auto#

--full-auto was deprecated in v0.128.0, and v0.147.0 removed the last codex exec --full-auto handling with the note "use --sandbox workspace-write instead". v0.169.0 has no --full-auto flag. The replacements: --sandbox workspace-write --ask-for-approval on-request for Auto, --approve-for-me for Auto with auto review, and --dangerously-bypass-approvals-and-sandbox (alias --yolo) for no sandbox and no prompts, which the docs mark as not recommended outside an externally sandboxed environment.[1][4]

Conditions and defaults#

FeatureDefaultConditionWhat changes it
Plan modeOff; sessions start in DefaultNo turn running for /plan; no task and no popup for Shift+Tab/plan, Shift+Tab, the "Implement this plan?" prompt
Plan reasoning effortmediumPlan turns onlyplan_mode_reasoning_effort
File edits in Plan modeForbidden by the mode's instructionsSandbox unchangedPair with read-only for a hard block
Auto reviewOff (approvals_reviewer = "user")on-request or granular approval policyapprovals_reviewer, --approve-for-me, /permissions
Reviewer modelcodex-auto-review (ChatGPT sign-in)Model in catalog, else session modelAPI key sign-in uses gpt-5.6-luna
Review timeout90,000 msPer review[auto_review] timeout_ms
Denial interrupt3 in a row, or 10 of the last 501 for cybersecurity modelsNot configurable
approval_policyon-requestn/aapproval_policy, -a
sandbox_modeworkspace-write in a directory with a trust decision, else read-onlyManaged requirements can force read-onlysandbox_mode, -s, /permissions

Timeline#

VersionReleasedChange
v0.88.02026-01-21Collaboration modes introduced, with the first Plan mode prompt
v0.93.02026-01-31Proposed plans stream into their own TUI view; feature-gated /plan
v0.94.02026-02-02Plan mode on by default
v0.95.02026-02-04/plan accepts an inline prompt and pasted images
v0.105.02026-02-25Collaboration-modes feature flag removed
v0.113.02026-03-10Guardian approval MVP, the first version of auto review
v0.115.02026-03-16Approval requests can go to a guardian subagent in core, app-server and TUI
v0.122.02026-04-20Guardian renamed Auto-Review; reviews use codex-auto-review; Plan mode can implement in a fresh context
v0.124.02026-04-23Auto review stable; config value renamed to auto_review; [auto_review] policy added
v0.128.02026-04-30--full-auto deprecated; denial retry flow added
v0.129.02026-05-07The denial retry command becomes /approve
v0.138.02026-06-08Automatic idle turns stay out of Plan mode
v0.147.02026-08-07--approve-for-me added; codex exec --full-auto handling removed
v0.149.02026-08-20approval_policy = "untrusted" retired
v0.156.02026-09-22Resumed sessions restore Plan mode
v0.165.02026-10-27Queued agent messages no longer restart work after a switch to Plan mode

Dates are GitHub release dates. The settings and defaults on this page are from v0.169.0, released 2026-11-13.[4]

Should you use Plan mode and auto review?#

Use Plan mode when the change touches more than one module or the spec is still open: Codex asks its questions before it writes code, and "clear context and implement" starts the build from the plan alone instead of a long exploration thread. Skip it for a one-line fix, where the questions cost more than they save. If a written-file mistake would be expensive, add Read Only while planning, because Plan mode alone does not change the sandbox.

Turn on auto review when approval prompts interrupt long runs and you would approve most of them anyway. It costs extra model calls per escalated action, it is not a deterministic security guarantee, and it never sees actions your sandbox already allows, so a narrow workspace-write sandbox matters more than the reviewer. Keep approvals_reviewer = "user" for repositories with production credentials or deploy access.


FAQ#

Q: How do I turn on plan mode in Codex CLI?

A: Type /plan, or /plan followed by your prompt, or press Shift+Tab while no task is running. There is no config key that starts a session in Plan mode.

Q: How do I exit plan mode in Codex?

A: Press Shift+Tab to go back to Default, or choose "Yes, implement this plan" or "Yes, clear context and implement" when Codex asks "Implement this plan?".

Q: Can Codex edit files in plan mode?

A: Its instructions forbid edits, formatters, patches and codegen, but Plan mode does not change the sandbox. Switch to Read Only in /permissions to block writes.

Q: What is codex-auto-review?

A: The model that runs Codex auto review. It decides approval requests (sandbox escalations, network access, edits outside the workspace, MCP calls) instead of asking you. It is used with ChatGPT sign-in; API key sign-in uses gpt-5.6-luna.

Q: How do I enable auto review in Codex?

A: Set approval_policy = "on-request" and approvals_reviewer = "auto_review" in ~/.codex/config.toml, start Codex with --approve-for-me, or pick Approve for me in /permissions.

Q: How do I turn off auto review?

A: Set approvals_reviewer = "user", or pick Default in /permissions.

Q: What replaced --full-auto in Codex?

A: --sandbox workspace-write --ask-for-approval on-request, the Auto preset. --full-auto was deprecated in v0.128.0 and is gone in v0.169.0. --approve-for-me adds auto review on top.

Q: What is Codex auto mode?

A: The default permission preset: sandbox_mode = "workspace-write" with approval_policy = "on-request". Codex edits files and runs commands in the workspace and asks before network access or edits outside it.


Sources: [1] Codex docs: agent approvals and security | [2] openai/codex at rust-v0.169.0 | [3] Codex docs: auto-review | [4] openai/codex release notes | Codex docs: slash commands

Related: Codex config.toml reference | Codex permissions reference | Codex CLI version tracker | Codex CLI v0.160.0 analysis | Codex CLI v0.165.0 analysis

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy