Skip to content

Cannot set approval_policy = "on-failure" from within CLI #3129

Closed

Description

@rben01

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

Activity

  1. added
    bug
    on Sep 3, 2025
  2. oyiakoumis commented on Sep 5, 2025

    @oyiakoumis
    Contributor

    Hello, I’ve opened a PR (#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.

  3. oyiakoumis commented on Sep 5, 2025

    @oyiakoumis
    Contributor

    btw I haven't tested it yet since main is currently in an unstable state (cf. #3202). I will rebase and test it when main is fixed.

  4. added
    sandbox
    on Nov 5, 2025
  5. etraut-openai commented on Dec 25, 2025

    @etraut-openai
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsandbox

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions