Skip to main content
🎓 Claude Code Masterclass Learn AI-assisted development on Udemy — plus the companion book on Leanpub & Amazon. Start Learning
Claude Code YOLO Mode dangerously skip permissions
AI

Claude Code YOLO Mode: Skip Permissions Safely

YOLO mode skips all Claude Code permission prompts — the agent edits files and runs commands without asking. Here is when to use it and how to stay safe.

LB
Luca Berton
· 4 min read

YOLO mode is the community nickname for running Claude Code with the --dangerously-skip-permissions flag. It bypasses every confirmation prompt — no more “approve this file edit?”, no more “allow this shell command?”. The agent just works.

That sounds risky, and it can be. But in the right environment it is one of the fastest ways to move from idea to working code.

What YOLO Mode Actually Does

Normally, Claude Code pauses before each action that touches your filesystem or runs a shell command. It asks for your approval. This is the right default — it keeps a human in the loop and catches mistakes before they land.

YOLO mode removes that loop entirely. Claude reads files, writes files, and executes commands in one uninterrupted flow. You see the results when it is done.

The tradeoff is simple: speed versus control. A task that requires fifty confirmations takes two minutes of clicking in normal mode. In YOLO mode it takes ten seconds.

How to Enable It

Terminal

Add the flag when launching Claude Code:

claude --dangerously-skip-permissions

For non-interactive use or piped workflows:

claude --print "refactor the auth module to use async/await" --dangerously-skip-permissions

VS Code

If you run Claude Code inside VS Code, you can make this permanent without typing the flag every time:

  1. Open VS Code Settings (Cmd+, on Mac, Ctrl+, on Windows/Linux)
  2. Search for permission
  3. Check “Allow Dangerously Skip Permissions”
  4. Set the dropdown below it to bypassPermissions

This persists across sessions. Useful if you spend most of your day inside a sandboxed dev container.

The Three Modes, Compared

Claude Code ships with three operating modes. Understanding where YOLO fits helps you pick the right one.

ModeConfirmationsBest For
NormalAll actionsProduction work, unfamiliar codebases, exploratory tasks
PlanNone (read-only)Reviewing a strategy before committing to changes
YOLONone (read + write)High-trust environments, repetitive tasks, CI pipelines

Plan mode is underused. If you want speed without the risk, Plan mode lets Claude map out every change it intends to make — you review the plan, then approve execution. You get the audit without the interruptions.

YOLO mode is for when you have already built that trust and want to skip even the plan review.

Safety Before You Enable It

The flag name says it: this is dangerous if you are not prepared. Two things make it safe to use.

1. A Clean Git Repository

Before every YOLO session, your repo should be committed and clean:

git status   # should show nothing to commit

If Claude makes an unintended change, recovery is one command:

git reset --hard HEAD

This is the minimum. Without it, you have no rollback and mistakes are permanent.

2. A Container or Sandbox

For anything beyond your personal dev machine, run Claude Code inside a Docker container. Mistakes stay inside the container. Your host system is untouched.

docker run --rm -it -v $(pwd):/workspace my-dev-image \
  claude --dangerously-skip-permissions

This is the pattern I use for automated agentic workflows where Claude runs in CI without human oversight.

When It Makes Sense

Use YOLO mode when:

  • You are in a throw-away environment (container, sandbox, disposable VM)
  • Your repo is clean and you can roll back in seconds
  • The task is repetitive and well-understood (refactoring, formatting, bulk renaming)
  • You are running Claude in a CI pipeline or automation script

Keep normal mode when:

  • You are working on a production codebase with uncommitted changes
  • The task is exploratory and you are not sure what Claude will do
  • You are working with secrets, credentials, or sensitive configuration
  • You are new to Claude Code and still building mental models of its behavior

Hooks as a Middle Ground

If you want speed without going fully unsupervised, Hooks give you selective control. You can auto-approve read operations and low-risk edits while still requiring confirmation for destructive commands like rm, git push, or database migrations.

This is closer to how production agentic AI systems are designed — not a binary choice between full control and no control, but a policy layer that enforces the rules that matter.

The Bigger Picture

YOLO mode is not a shortcut for lazy engineers. It is a tool for engineers who have already done the work to make their environment safe. Version control, sandboxing, and a clear task scope — get those right and removing confirmation prompts just removes friction from a process you have already validated.

The real skill is knowing when to hand the wheel over. Start with normal mode, build confidence in how Claude behaves on your codebase, then selectively unlock autonomy where it earns it.

Free 30-min AI & Cloud consultation

Book Now