Live on Product Hunt Intraface launched today. Less steering, more vacations. See the launch
Start for free

What is YOLO mode?

YOLO mode is the setting that lets a coding agent run every tool call, file edit and shell command without asking you first. Gemini CLI names it --yolo, Cursor calls it Run Everything, Claude Code calls it bypassPermissions. It trades every safety prompt for speed, so vendors tell you to use it only inside a container or VM.

Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.

How it works

With prompts, the agent asks you before each risky action; in YOLO mode it goes straight to the machine, so that machine should be disposable.with promptsagentyouyour machinefiles, shell, networkYOLO modeagenta machineideally a container1. may I run this?2. allow3. runs itruns everything, no prompt
  1. Normally an agent stops before a shell command, a file write or an MCP call and waits for you to allow it.

  2. YOLO mode removes that stop. Gemini CLI's --yolo approves every action; Cursor's Run Everything and Claude Code's bypassPermissions do the same.

  3. Nothing else changes. The agent still reads the same files and pages, so a prompt injection it meets now runs with nobody watching.

  4. Vendors fence it. Gemini CLI won't accept YOLO in settings.json; Claude Code refuses to start in it as root and says to use it only in containers or VMs.

  5. The newer middle ground is a classifier: Claude Code's auto mode and Cursor's Auto-review have a second model review each action instead of you.

Source: Gemini CLI docs: settings

YOLO mode versus the other approval modes

Every coding agent has a ladder of how much it asks. Gemini CLI's rungs are default, which prompts for approval, auto_edit, which approves edit tools and still asks about commands, plan, which is read-only, and yolo, which approves all actions. Claude Code's are default, acceptEdits, plan, auto, dontAsk and bypassPermissions, with --dangerously-skip-permissions as the shortcut for the last. Cursor offers Allowlist, Auto-review and Run Everything. Codex gets there by pairing the danger-full-access sandbox with approval_policy = "never".

The top rung is the same everywhere: no prompt, ever. The rungs below differ in what they let through without asking, and that is where the interesting choice lives. Approving edits but not commands catches most of the damage an agent can do while removing most of the prompts, because edits are visible in git and commands are not.

Example: a long refactor in a container

You want an agent to rename a module across two hundred files, run the tests, fix what breaks, and repeat until green. Done interactively, that is an hour of pressing Enter. Done in YOLO mode on your laptop, it is an hour in which one bad rm or one poisoned README can reach your home directory.

The pattern the vendors recommend is a disposable machine. Claude Code's docs point to its dev container configuration, which runs the agent as a non-root user behind a firewall that limits outbound traffic to an allowlist, and the CLI refuses bypassPermissions under root or sudo. Start the agent there with the flag, let it work, and review the diff when it comes back. Nothing it could break was yours to begin with.

When to use it

Use YOLO mode when three things are true: the task is long and repetitive, the environment is isolated and holds no credentials, and you will review the result before it goes anywhere. Drop any one of them and pick a lower rung instead. For a task you are watching anyway, accept-edits modes remove most prompts without the risk. For a task you can't watch, the classifier modes exist for exactly this gap.

Common mistakes

  • Enabling it to silence one annoying prompt. If one command keeps asking, allow that command. Every agent has an allowlist for exactly this.
  • Running it where secrets live. Environment variables, ~/.ssh and cloud credentials are all readable by a shell the agent controls. Claude Code's warning says to use the mode where it cannot damage your host system.
  • Mistaking it for a sandbox. YOLO mode decides whether the agent asks. A sandbox decides what a command can reach. Cursor's Run Everything turns off both the prompts and the sandbox.
  • Leaving it on. Gemini CLI makes it a flag so it dies with the session. If your agent lets you persist it in settings, don't.

FAQ

Is YOLO mode safe if I trust my own code?
Your code isn't the risk. The agent also reads dependencies, web pages, issue threads and tool output, and any of them can carry instructions. Claude Code's docs say bypassPermissions offers no protection against prompt injection. Trust the environment, not the input: run it where damage is contained.
What is the difference between YOLO mode and auto mode?
YOLO mode approves everything. Auto mode, in Claude Code, and Auto-review, in Cursor, send each action a human would have been asked about to a classifier model that can still deny it. Fewer prompts, not zero checks, though both vendors say the classifier can be wrong.
Why is YOLO mode a command-line flag and not a setting in Gemini CLI?
On purpose. The settings reference says YOLO can only be enabled via the command line, with --yolo or --approval-mode=yolo. A flag is typed for one session; a setting would silently apply to every future one, including sessions started by someone else's script.

Stop sending HTMLover Slack.

Create an account in a minute, connect your coding agent, and make your first board.