Cannot set `approval_policy = "on-failure"` from within CLI

Resolved 💬 3 comments Opened Sep 3, 2025 by rben01 Closed Dec 25, 2025
💡 Likely answer: A maintainer (oyiakoumis, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.29.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

In ~/.codex/config.toml, set approval_policy = "on-failure". Then in codex, use /approvals to change the approval mode to something else. You won't be able to get approval_policy = "on-failure" again within the same session.

Critically, the Auto mode, which the docs say is equivalent to --sandbox workspace-write + --ask-for-approval on-failure, is actually equivalent to --sandbox workspace-write + --ask-for-approval on-request.

What is the expected behavior?

Selecting /approvals = Auto should set approval mode to on-failure.

Given that there are 4*2 = 8 options total for approval + sandbox, there should probably just be separate /approvals and /sandbox commands so that the user has full access to all configuration options from within a session.

What do you see instead?

After setting /approvals to Auto,

  • Approval Mode: on-request
  • Sandbox: workspace-write

This is not --full-auto as described in the docs.

Additional information

_No response_

View original on GitHub ↗

3 Comments

oyiakoumis contributor · 11 months ago

Hello, I’ve opened a PR (https://github.com/openai/codex/pull/3205) to address this issue. I’m currently learning Rust and saw this as a good opportunity to practice while making a useful contribution. Please don’t hesitate to suggest adjustments or let me know if this isn’t the right approach. I’m open to making the required changes, and if it’s approved, I’ll also update the documentation.

oyiakoumis contributor · 11 months ago

btw I haven't tested it yet since main is currently in an unstable state (cf. https://github.com/openai/codex/issues/3202). I will rebase and test it when main is fixed.

etraut-openai contributor · 8 months ago

I think this bug is stale and no longer relevant. Closing.