YOLO mode in Claude Code, Codex, Copilot and Cursor
Updated
YOLO mode means running a coding agent with its approval prompts turned off: it edits files, runs commands and fetches URLs without asking you first. The name started as a real setting in Cursor in December 2024. Today it’s slang for each tool’s skip-all switch: --dangerously-skip-permissions in Claude Code, --yolo in Codex, Copilot CLI and the Cursor CLI, Run Everything in the Cursor editor, and --auto in OpenCode.
They don’t all turn off the same thing. Codex’s switch also removes the sandbox; Claude Code’s keeps your deny rules.
The switch in each tool#
| Tool | YOLO switch | What it turns off | What still applies |
|---|---|---|---|
| Claude Code | claude --dangerously-skip-permissions |
Ordinary permission checks for edits, commands and fetches | Deny and explicit ask rules, certain critical actions and cross-session approvals, and the shell sandbox if enabled |
| Codex | codex --yolo (--dangerously-bypass-approvals-and-sandbox) |
Every approval and the sandbox: no file or network limits | Nothing from Codex itself |
| Copilot CLI | copilot --yolo (--allow-all), or /yolo in a session |
Prompts for tools, paths and URLs. In Autopilot, check whether the option also disables sandboxing. | Explicit deny rules and applicable organization policy. Use /sandbox status to check the session. |
| VS Code (Copilot) | Choose Allow all in the chat input’s permissions picker for a Copilot session. Supported local or CLI sessions also accept /yolo. |
Ordinary tool confirmations | An enabled sandbox and organization policy still apply. VS Code approval controls |
| Cursor editor | Run mode Run Everything | Prompts, the sandbox and the reviewing model | Protections you leave on (file deletion, outside files, browser) |
| Cursor CLI | agent --yolo (--force) |
Command approvals, workspace trust, MCP approvals | Deny rules in cli.json |
| OpenCode | opencode --auto, opencode run --auto |
Every ask rule |
Rules set to deny |
| DeepSeek Harness | The danger-full-access preset |
Approvals and the write sandbox | Nothing from the harness |
Why does everyone end up using it?#
Because the alternative is usually worse. In the default modes, a real task means dozens of prompts: every test run, every build, every git add. After the twentieth, nobody reads them. A prompt you approve without reading protects nothing; it only slows you down.
The build log in Vibecoding: How to get from 0 to SaaS in hours puts the habit in one line: “As always, I hit accept all.”
So people switch to YOLO, and that includes people who know better. The engineer who built Contenox Runtime’s permission system still runs Claude Code in Bypass permissions mode for daily work, because the modes in between didn’t fit the work.
The fix isn’t more willpower. It’s a middle mode that doesn’t wear you out, so the off switch stops being tempting.
The allow-list wall: prompts are not the only thing that drives people to the switch. A rule that stops the agent without telling the person how to open it does the same. Asked to explore a codebase, Beam, an earlier terminal client from the Contenox team built to be secure by default, tried a shell command, hit its own policy (no allow list configured), and instead of pointing at the ten-second fix in the policy file, fell back to a scripted answer: it asked for the path to the codebase and started suggesting terminal commands to run by hand. The note on it in The 90%-Done Paradox: the difference between a tool and an engineer is knowing when to stop following the script and fix the stage, with the bet that most people would have pasted the
lsoutput back into the chat. A permission prompt that names the rule it came from, and how to change it, is the version of this that keeps approvals on.
The new middle: a model approves for you#
In 2026, all four big tools answered the same way: a second model looks at each action and approves the routine ones.
| Tool | Mode | Who decides |
|---|---|---|
| Claude Code | auto | A classifier reviews eligible tool calls. This is the default for eligible interactive terminal and VS Code sessions from v2.1.283. Non-interactive sessions, model support and managed settings can change the default. |
| Codex | --approve-for-me, or approvals_reviewer = "auto_review" |
An automatic reviewer, inside the workspace-write sandbox |
| Copilot | Assisted (/permissions assisted in the CLI) |
A model approves requests it judges safe |
| Cursor | Auto-review (the default) | Allowlisted commands run, others go to the sandbox, the rest to a model |
This cuts the prompts a lot, and it’s a real improvement over YOLO. Two limits are worth knowing. The reviewer is a model, so it can be wrong in both directions, and Cursor’s docs say plainly it’s “not a security boundary”. And you can’t read in advance what it will allow: the decision is made per action, and tomorrow’s model may judge differently.
Can I use YOLO mode safely?#
Yes, inside a box where a mistake can’t reach anything that matters. Claude Code’s docs say to use bypass mode only in an isolated container or VM, ideally without internet. Codex’s docs say its YOLO flag is for “an externally hardened environment”.
That means:
- A container or VM with only the project mounted. No home folder, no SSH keys, no cloud credentials, no browser profile.
- A disposable copy inside the isolation boundary. A fresh clone helps with recovery. A Git worktree alone shares repository data and leaves the process with your ordinary filesystem access. Git worktrees
- Limited network, if the task allows it. A run that can’t reach the internet can’t leak anything to it.
- A cloud agent, which works on a copy of the repo on someone else’s machine by design.
On your own machine, with your real keys and your real git remotes, YOLO mode is a bet that nothing goes wrong this time.
In Codex,
--approve-for-mekeeps the workspace sandbox and sends eligible approval requests to an automatic reviewer. With-a never --sandbox workspace-write, an action that needs escalation cannot request it. Check the configured writable roots and network policy for the actual boundary. OpenAI’s approval and sandbox guide
What to use instead#
Ordered from closest to YOLO to safest:
- Use a shell sandbox. Claude Code can auto-approve commands contained by its sandbox on macOS, Linux or WSL2. Its default writable locations include the working directory, a temporary directory and any additional directories you granted. Native Windows shell commands run unsandboxed. Scope of Claude Code’s shell sandbox
- A reviewer mode: auto, Auto-review, Assisted,
--approve-for-me. Few prompts, the judgment of a model. - Rules for your routine commands: allow
npm test *,npm run build,git add *once, and keep prompts for the rest. See why your agent keeps asking for the exact syntax per tool. - Edits without asking, commands with asking: Claude Code’s
acceptEditsmode, Copilot’schat.tools.edits.autoApprove.
Contenox Harness#
Contenox Harness takes the third route and makes it the default: YOLO speed on the routine work, and the dangerous part still asks. Out of the box the routine commands run without a card, the destructive ones and the credential stores are gated or blocked, and what counts as routine is a rule set that can be read and changed under Permissions; the starting set is on built-in tools and permissions.
For a developer’s own machine there is a set that allows everything not named and still asks before risky commands and history changes. Every rule is plain text, readable before the first session, not a model’s judgment call.
Related guides#
—dangerously-skip-permissions: what Claude Code’s flag disables, in detail--dangerously-skip-permissions: what it skips, what staysWhat Claude Code's --dangerously-skip-permissions turns off, what still applies, the Codex, Copilot, Cursor and OpenCode equivalents, and safer options.
Why does my agent keep asking for permission?: fix the prompts insteadWhy does Claude Code or Codex keep asking for permission?Claude Code, Codex, Copilot or Cursor keeps asking for permission? The real cause in each tool, the exact rule or setting that fixes it, and what to keep asking.
How to sandbox AI coding agents: the box YOLO mode needsHow to sandbox an AI coding agent: Claude Code, Codex, OpenCodeHow to sandbox an AI coding agent so a mistake, a prompt injection or a poisoned package can't reach your keys: built-in sandboxes, containers, and the traps.
AI agent permissions: what to allow, ask and blockAI agent permissions for coding agents: a safe starting rule set, real config for Claude Code and Codex, the gaps in command rules, and when to skip prompts.