Claude Code YOLO mode: what it really is and safer ways to use it
YOLO means running an agent with no approval prompts. In Claude Code the no-prompt mode is bypassPermissions, and the --dangerously-skip-permissions flag is equivalent to it. The docs reserve it for isolated environments such as containers and VMs. You rarely need it. Auto mode, acceptEdits, allow rules and a sandbox remove most prompts and keep a safety net. If you go all the way, do it where the damage stays in a container or VM, and commit first.
You want the agent to stop interrupting you, and that is a fair goal. This page explains what YOLO points at, what you give up, and four ways to get the speed back with something under you.
01What people mean by Claude Code YOLO mode
The word shows up in several tools. Gemini CLI has a yolo approval mode, where all tools are auto-approved and the docs say to use extreme caution. Its --yolo flag is deprecated in favor of --approval-mode=yolo. Codex has an alias too: --dangerously-bypass-approvals-and-sandbox, also written --yolo, means no sandbox and no approvals. Cursor's Run Everything makes every tool call run automatically, and Cursor staff once advised running Cursor as YOLO in a virtual environment.
For Claude Code, the matching mode is bypassPermissions. It sits at the end of the list: default, acceptEdits, plan, auto, dontAsk and bypassPermissions. It covers everything and is meant for isolated containers and VMs only. The command-line flag --dangerously-skip-permissions is equivalent. The flag has its own deep dive: dangerously skip permissions.
02Which mode Claude Code uses today
With Claude Code v2.1.283 or later, auto mode is the built-in starting mode for interactive terminal and VS Code sessions. Manual mode, whose config value is default, asks before Bash commands except a built-in set of read-only ones. Press Shift+Tab to switch the mode of your session.
In VS Code the mode indicator shows where you are. So you are probably not in YOLO territory right now. You are in a middle mode that still puts a reviewer in front of actions.
03YOLO versus auto mode
They sound alike and are not. Auto mode adds a reviewer: a separate classifier model, a second model that judges each proposed action, checks actions before they run. It blocks curl piped to bash, irreversible destruction of old files and git reset --hard. The full list is on the auto mode page.
YOLO has no reviewer. Allow rules have no effect there, and the docs' table says it covers everything. Auto mode goes so far as to block launching an agent loop started with the flag. Auto mode does not guarantee safety either, but it is still a gate.
04Two modes that are not YOLO
Some modes cut prompts without opening the door. In plan mode Claude reads files and runs read-only shell commands to explore but does not edit your source files. With auto mode available, classifier-approved commands also run. Start it with claude --permission-mode plan when you want a look before any change. In dontAsk mode anything that would prompt is denied, which suits locked-down CI and scripts. A CI call can pair it with an exact allowlist, as in the docs example that runs the test suite with --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read". Both stay far from Claude Code YOLO mode, because they refuse instead of allowing.
05Is Claude Code dangerous
Claude Code asks first in manual mode. The risk of Claude Code YOLO mode comes from taking that prompt away. Even in manual mode the boundary is only a prompt, so a Bash command you approve can write anywhere your user account can. Take the prompt away and that becomes the default behavior. Add an agent that reads outside content, and Anthropic's own advice applies: servers that fetch external content can expose you to prompt injection, meaning hostile text the agent reads and treats as instructions.
One thing still holds in every mode. Deny rules block in every mode, including bypassPermissions. If you must run without prompts, write the deny rules first. Rules are enforced by Claude Code, not by the model.
06What goes wrong when approval prompts are gone
Two public stories show the failure.
- On the Cursor forum a user running YOLO said Cursor deleted everything on his computer. Cursor staff asked whether file deletion protection was enabled.
- A Claude Code issue reports that
rm -rfdeleted all user files in a home directory, on WSL2, on 21 October 2025. The reporter saw the command run and interrupted it, but the files were already gone.
Attackers use these names too. The s1ngularity supply-chain attack prompted installed AI command-line tools with the flags that skip approval. The full story is on the dangerously skip permissions page, and the advisory list is on Claude Code security.
07Four milder ways to get the speed
| Option | What you get | What it does not cover |
|---|---|---|
| Auto mode | A classifier reviews actions | No guarantee of safety |
| acceptEdits | Reads, file edits and common filesystem commands run without asking | Other commands still prompt |
| Allow and deny rules | A deny rule such as Read(./.env) blocks the reads it matches, in every mode | Deny rules miss the same program by path or inside sh -c |
| Sandbox | The OS enforces a boundary around shell commands | Reduces risk, not a complete isolation boundary |
Rule syntax and the order rules are checked in are on Claude Code permissions.
08The sandbox on a Mac
On macOS the sandbox uses the built-in Seatbelt framework, a macOS feature that limits what a process can touch. Turn it on with /sandbox or set sandbox.enabled to true in settings. It is off by default. Writes are limited to the working directory, the temp directory and directories you add. Because the OS enforces it, it holds regardless of what the model chose to run. In auto-allow mode, commands that run inside the sandbox are approved without a prompt.
Know its limits. Reads cover the whole computer except denied folders, and credential files stay readable. It covers shell commands only, so file tools, MCP servers and hooks run outside it. MCP servers are programs that give the agent extra tools. Claude can retry a failed command outside the sandbox through the dangerouslyDisableSandbox escape hatch. If the platform check fails, commands run unsandboxed by default. Setup steps: Claude Code sandbox.
09Hooks and containers
Two more guards have their own pages. A hook is a script of yours that Claude Code runs before a tool call and that can veto it, even in bypassPermissions. Examples are on Claude Code hooks. A container runs Claude's commands away from your Mac, which is why the docs allow the flag there. Setup is on Claude Code devcontainer.
10Before you go all the way
Make sure you can undo it. Apple says local snapshots let you recover previous versions of files even if the backup disk is not attached. Commit your work and keep secrets out of the folder. If you use a container, the docs advise against mounting ~/.ssh or cloud credential files into it. Then read the other tools' pages if you run them too: Cursor YOLO mode, Codex full-auto and Gemini CLI YOLO mode. The side-by-side view is in the agent permissions overview.
11What to take away
Claude Code YOLO mode is bypassPermissions, the setting for isolated containers and VMs. For everyday work on your Mac, use auto mode, a short allow list and a sandbox, and keep the full no-prompt run for a throwaway environment.
FAQ
What is YOLO mode?
It is the name for running an agent without approval prompts. Gemini CLI has a yolo approval mode where all tools are auto-approved, and Cursor's Run Everything runs every tool call automatically.
What mode does Claude Code use?
With v2.1.283 or later, auto mode is the built-in starting mode for interactive terminal and VS Code sessions. Manual mode, config value default, asks before Bash commands except read-only ones.
What is the difference between auto mode and the dangerously skip permissions option?
Auto mode puts a classifier in front of actions. The flag replaces the prompt with nothing. Auto mode even blocks launching an agent loop started with the flag.
Why does Claude Code keep asking for permission?
In manual mode it asks before Bash commands and file edits. Save a rule or switch the mode with Shift+Tab to ask less.
Is Claude Code dangerous?
It asks first in manual mode, and the risk grows as you remove the prompt: a Bash command you approve can write anywhere your user account can. Containers and sandboxes limit that.
Can I use YOLO mode safely?
Only inside an isolated container or VM, which is where the docs place bypassPermissions. Even there, a container does not stop theft of anything reachable inside it.
How do I turn it on in the desktop app?
The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions. You cannot enter bypassPermissions from a session started without it.