Skip to content

"Not inside a trusted directory" error when with "--yolo" flag #7522

Closed

Description

@mathymess

What version of Codex is running?

v0.63.0

What subscription do you have?

API Token passed to stdin of codex login (doesn't matter for this ticket)

Which model were you using?

Doesn't matter

What platform is your computer?

Linux 6.14.0-36-generic x86_64 x86_64

What issue are you seeing?

I'm running codex exec in an externally sandboxed environment (docker image) with --dangerously-bypass-approvals-and-sandbox flag (alias --yolo).

I get

[cmd] > Not inside a trusted directory and --skip-git-repo-check was not specified.

and codex exits with code 1.

What steps can reproduce the bug?

Run with --dangerously-bypass-approvals-and-sandbox

What is the expected behavior?

Just runs, skips all checks as documented

Additional information

Adding --skip-git-repo-check works but it shouldn't be necessary since --yolo is documented to Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed

Fixing the doc is also a possible solution

Thank you

Activity

  1. added
    bug
    on Dec 3, 2025
  2. added
    CLI
    sandbox
    on Dec 3, 2025
  3. removed
    CLI
    on Dec 7, 2025
  4. added a commit that references this issue on Jan 21, 2026
    04951a8
  5. added a commit that references this issue on Jan 23, 2026
    ae7d3e1
  6. added a commit that references this issue on Jan 25, 2026
    b0785e2
  7. added a commit that references this issue on Jan 26, 2026
    3dc13fb
  8. added a commit that references this issue on Feb 27, 2026
    497cefa
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

    bugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions