Skip to content

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

@mathymess

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsandboxIssues related to permissions or sandboxing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions