Repository navigation
Description
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?
-
Set in ~/.codex/config.toml:
approval_policy = "never"
sandbox_mode = "workspace-write" -
Launch codex with:
codex --dangerously-bypass-approvals-and-sandbox -
Trust prompt appears for every new directory on every launch.
-
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:
- YOLO suppresses trust prompt but still blocks .codex/skills (empty $ menu without explanation) #9695: YOLO suppresses trust prompt (about skills loading, not the prompt itself)
- "Not inside a trusted directory" error when with "--yolo" flag #7522: "not inside trusted directory" with --yolo (fixed in fix(exec): skip git repo check when --yolo flag is used #9590)
- fix(tui) remove config check for trusted setting #11874: PR that introduced the regression ("remove config check for trusted setting")
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
github-actions commentedon Mar 13, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
--dangerously-bypass-approvals-and-sandboxoption. #14345Powered by Codex Action
arvinmi commentedon Mar 13, 2026
This is a duplicate, closing.
fix: auto-accept Codex directory trust prompt (openai/codex#14547)
codex-delegation: Note codex trust registration