Steps
- 1
Step
Go to the project folder
Codex works from the current directory, so this folder is the boundary for the session.
cd /path/to/your/project - 2
Step
Run Codex YOLO
In recent Codex CLI builds, YOLO is the fast path people use when they want fewer approval prompts. If your CLI does not expose --yolo, use the explicit dangerous bypass flag shown below.
codex --yolo - 3
Step
Use the explicit bypass if needed
The current help text describes this as skipping confirmation prompts and executing without sandboxing. It is extremely dangerous unless the environment is already externally sandboxed.
codex --dangerously-bypass-approvals-and-sandbox
Why this matters
Codex YOLO mode is useful when you want speed and fewer prompts, but the tradeoff is safety. The right folder, a clean Git state, and final diff review are what keep the workflow useful instead of risky.
Troubleshooting
- If codex --yolo is not recognized, run codex --help and look for --dangerously-bypass-approvals-and-sandbox.
- If Codex edits the wrong files, stop the session and restart from the correct project folder.
- If you are unsure, do not use YOLO; run Codex normally first and keep approvals on.
FAQ
What is Codex YOLO mode?
It is the low-friction way people refer to running Codex with approvals reduced or skipped so the agent can work faster.
What command should I run?
Use cd /path/to/your/project && codex --yolo when your CLI supports it.
What if codex --yolo is not available?
Use codex --help. Current Codex CLI help exposes --dangerously-bypass-approvals-and-sandbox as the explicit dangerous bypass option.
Is YOLO mode safe?
It is faster but riskier. Use it only in a folder you trust, ideally with Git clean and a rollback path.
How do I verify the result?
Run git status, git diff --stat, git diff --check, tests or lint, then keep only the changes you understand.
Related tutorials
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.
Aider
How to Install Aider AI Coding CLI on Mac and Windows
Step-by-step guide to installing the Aider AI pair programming CLI on macOS and Windows. Learn how to configure API keys for Claude 3.7 and GPT-4o.