Skip to content

Trust prompt appears on every launch despite yolo mode and global approval policy set to never #14547

Closed

Description

@arvinmi

What version of Codex CLI is running?

codex-cli 0.114.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.4, gpt-5.3-codex

What platform is your computer?

Linux 6.8.0-101-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Ghostty, Ghostty + Tmux

What issue are you seeing?

Every time codex is launched, the trust prompt appears:

You are in /home/user/path

Do you trust the contents of this directory? Working with untrusted
contents comes with higher risk of prompt injection.

› 1. Yes, continue
  2. No, quit

This occurs even though approval_policy = "never" is set in ~/.codex/config.toml, sandbox_mode = "workspace-write" is set in ~/.codex/config.toml, and codex is launched with --dangerously-bypass-approvals-and-sandbox (--yolo)

Previously, having a custom approval_policy or sandbox_mode set globally suppressed the trust screen entirely (via should_show_trust_screen in codex-rs/tui/src/lib.rs). This stopped working around v0.113.0 which included the change "fix(tui) remove config check for trusted setting" (#11874).

Additional pressing Ctrl+C at the trust prompt causes codex to continue launching (same as selecting "Yes") rather than quitting (same as selecting "No"). This is a SIGINT handling bug in the prompt.

What steps can reproduce the bug?

  1. Set in ~/.codex/config.toml:
    approval_policy = "never"
    sandbox_mode = "workspace-write"

  2. Launch codex with:
    codex --dangerously-bypass-approvals-and-sandbox

  3. Trust prompt appears for every new directory on every launch.

  4. Selecting "Yes" does not persist as prompt reappears next launch
    unless the exact path is manually added to config.toml under
    [projects."/absolute/path"] trust_level = "trusted"

What is the expected behavior?

When --dangerously-bypass-approvals-and-sandbox is passed, or when approval_policy and sandbox_mode are explicitly set in config.toml, the trust screen should be suppressed entirely. The user has already made an explicit trust decision by opting into dangerous mode.

This was the previous behavior before v0.113.0.

Additional information

Related issues:

The [projects."*"] wildcard does not work for global trust, only exact absolute paths are matched, making manual config edits impractical for users working across many directories, and not wanting there config.toml to be littered with trusted configs for each directory.

Activity

  1. added
    bug
    on Mar 13, 2026
  2. added
    CLI
    TUI
    sandbox
    on Mar 13, 2026
  3. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. arvinmi commented on Mar 13, 2026

    @arvinmi
    Author

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

    This is a duplicate, closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLITUIbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions