Skip to content

Conversation

@zerone0x
Copy link
Contributor

Summary

Fixes #7522

The --yolo (--dangerously-bypass-approvals-and-sandbox) flag is documented to skip all confirmation prompts and execute commands without sandboxing, intended solely for running in environments that are externally sandboxed. However, it was not bypassing the trusted directory (git repo) check, requiring users to also specify --skip-git-repo-check.

This change makes --yolo also skip the git repo check, matching the documented behavior and user expectations.

Changes

  • Modified codex-rs/exec/src/lib.rs to check for dangerously_bypass_approvals_and_sandbox flag in addition to skip_git_repo_check when determining whether to skip the git repo check

Testing

  • Verified the code compiles with cargo check -p codex-exec
  • Ran existing tests with cargo test -p codex-exec (34 passed, 8 integration tests failed due to unrelated API connectivity issues)

🤖 Generated with Claude Code

The --yolo (--dangerously-bypass-approvals-and-sandbox) flag is documented
to skip all confirmation prompts and execute commands without sandboxing,
intended for environments that are externally sandboxed. However, it was
not bypassing the trusted directory (git repo) check, requiring users to
also specify --skip-git-repo-check.

This change makes --yolo also skip the git repo check, matching the
documented behavior and user expectations.

Fixes openai#7522

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@etraut-openai
Copy link
Collaborator

@zerone0x, you'll need to sign the CLA.

@etraut-openai etraut-openai added the needs-response Additional information is requested label Jan 22, 2026
@zerone0x
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@etraut-openai etraut-openai removed the needs-response Additional information is requested label Jan 23, 2026
@etraut-openai etraut-openai merged commit ae7d3e1 into openai:main Jan 23, 2026
25 of 32 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants