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

Claude Code YOLO mode can globally bypass permission prompts with permissions.defaultMode=bypassPermissions. Here is how to enable it and stay safe.

LB
Luca Berton
Β· 5 min read

YOLO mode is the community nickname for running Claude Code without interactive permission prompts. Traditionally that meant launching Claude Code with --dangerously-skip-permissions. The more permanent version is setting permissions.defaultMode to bypassPermissions in ~/.claude/settings.json.

That global setting makes new Claude Code sessions auto-accept tool calls without prompting. File edits, shell commands, deletes, force pushes, dependency installs, and other actions can proceed without the normal approval loop.

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.

If you want the full workflow around Claude Code, prompts, permissions, MCP, hooks, and production habits, I cover it in my Claude Code Masterclass on Udemy.

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

Global Settings

To enable YOLO mode globally for new Claude Code sessions, edit ~/.claude/settings.json and set permissions.defaultMode to bypassPermissions:

{
  "permissions": {
    "defaultMode": "bypassPermissions"
  }
}

If your settings file already contains other keys, add the permissions object without deleting the rest of your configuration. Validate the JSON before restarting Claude Code:

python -m json.tool ~/.claude/settings.json >/dev/null

Restart any running Claude Code sessions after changing the file. The setting applies globally to new sessions. You may also see a one-time confirmation dialog the first time bypass mode activates.

To revert, remove the line or change the value back to the normal permission mode you were using before:

{
  "permissions": {
    "defaultMode": "default"
  }
}

One-Off Terminal Session

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

Use this when you want bypass mode for one session but do not want to change your global settings.

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
YOLO / bypassPermissionsNone (read + write + commands)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. The global setting is even more serious because you can forget it is enabled. Three things make it safer 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 Branch With a Narrow Scope

Do not run global bypass mode directly on main unless you are in a disposable repo.

git switch -c claude/yolo-refactor

Keep the task narrow: one refactor, one migration, one cleanup, one test pass. A broad prompt plus global permissions is where surprises become expensive.

3. 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.

What Can Go Wrong

Global bypassPermissions means Claude Code can approve actions you would normally inspect first. The obvious risks are deleted files and bad edits. The less obvious risks are often worse:

  • A command updates lockfiles or dependencies across the repo
  • A script rewrites generated files you did not intend to touch
  • A cleanup removes local-only configuration
  • A Git command stages unrelated changes
  • A deployment or push command runs before you are ready

That does not mean you should never use YOLO mode. It means the environment needs to be designed so a bad action is recoverable.

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
  • You have tests or linters that can catch bad edits quickly

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
  • You are connected to production infrastructure or deployment credentials

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.

For a complete Claude Code workflow, including prompting, CLAUDE.md, Git discipline, MCP, hooks, and production readiness, take my Claude Code Masterclass: AI-Powered Development.

Frequently Asked Questions

What does Claude Code YOLO mode do?

YOLO mode bypasses Claude Code permission prompts so file edits, shell commands, and other tool calls can run without manual approval.

How do I enable YOLO mode globally?

Set permissions.defaultMode to bypassPermissions in ~/.claude/settings.json, validate the JSON, and restart any running Claude Code sessions.

Is bypassPermissions safe?

It is only safe in controlled environments such as clean Git repositories, containers, disposable VMs, or automation workflows with strong guardrails. It can approve destructive actions without prompting.

#Claude Code #Anthropic #AI #Developer Tools #Automation #Productivity
Share:
AI Integration & GPU Platforms

Need help with AI Integration & GPU Platforms?

Need help deploying AI/ML platforms? Get expert consulting on OpenShift AI, GPU orchestration, and MLOps.

Learn more about AI Integration & GPU Platforms

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer β€” then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard β†’
Luca Berton β€” AI & Cloud Advisor, Docker Captain

Luca Berton

AI & Cloud Advisor Β· Docker Captain Β· KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min AI & Cloud consultation

Book Now