---
title: "--dangerously-skip-permissions: what it turns off, and the safer ways to stop the prompts"
date: "2026-11-16T07:30:00.000+02:00"
updated: "2026-11-09T23:07:51.891Z"
tags: ["AI", "Vibe Coding"]
canonical: "https://mariluukkainen.com/blog/claude-code-dangerously-skip-permissions"
---

`claude --dangerously-skip-permissions` starts Claude Code with permission prompts turned off. Claude edits files, runs shell commands and calls tools without asking. It is the same as `--permission-mode bypassPermissions`, and people also call it YOLO mode.

The docs say to use it only in isolated environments, such as containers, VMs or dev containers without internet access, where Claude can't damage your host system. They also say it offers no protection against prompt injection. If Claude reads a web page or a file with hostile instructions in it, nothing checks those instructions before they reach your shell.

I don't use it. About 25 Claude robots run on one of my servers on a schedule, without anyone watching, and they run in auto mode with hooks. More on that below.

## What it turns off

Bypass mode skips permission prompts and the safety checks around them, including writes to protected paths. Allow rules stop mattering, because everything is allowed.

## What still stops it

A few things still prompt or refuse even in bypass mode:

- **Deny rules.** Anything in `permissions.deny` is blocked in every mode.
- **Explicit `ask` rules.**
- **Removals of critical paths** with `rm` and `rmdir`.
- **Reads outside the working directories**, if you have turned on `permissions.blockReadsOutsideWorkingDirectories`.

It also won't start as root. On Linux and macOS, running it with sudo or as root fails with `--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`, unless Claude Code detects a recognized sandbox. The docs recommend a dev container with a non-root user for unattended runs.

The first time you use it interactively, a warning asks you to accept responsibility. Accepting saves that choice to `~/.claude/settings.json`.

## When it is the right tool

Bypass mode makes sense when the environment itself limits the damage:

- a container or VM with no credentials you care about,
- no network access, or access only to what the task needs,
- a fresh checkout you can throw away,
- a task with a clear end, such as "make the tests pass" or "upgrade this dependency and fix what breaks".

In that setup the worst case is a broken container, which you delete. On a laptop, Claude can reach your SSH keys, cloud credentials and every repo you have.

## Other ways to cut prompts

**Auto mode.** A separate classifier reviews each action before it runs and blocks anything that goes beyond your request, targets infrastructure it doesn't recognize, or looks driven by something hostile Claude read. Ordinary work runs without prompts. It is the default start mode for interactive terminal and VS Code sessions since version 2.1.283. Start it explicitly with `claude --permission-mode auto`. The docs say it reduces prompts but doesn't guarantee safety, and if the classifier blocks 3 actions in a row or 20 in total, it goes back to asking you.

**`acceptEdits`.** File edits and common filesystem commands in your project run without asking, and everything else still asks. Good for refactors with few shell commands.

**Allow rules.** The prompts you click "yes" on every day can go in your settings:

```json
{
  "permissions": {
    "allow": ["Bash(npm test)", "Bash(npm run lint)", "Bash(git status)"],
    "deny": ["Bash(git push --force *)", "Read(./.env)"]
  }
}
```

Narrow allow rules like `Bash(npm test)` are safe to keep. A broad one like `Bash(*)` allows everything, the same as bypass mode, which is why auto mode drops those when it starts.

**Hooks.** A `PreToolUse` hook can block the exact commands you never want, with a script you control, in any mode. A hook that exits with code 2 blocks the call.

## My setup

My laptop sessions and the robots both run in auto mode, with these hooks in `~/.claude/settings.json`:

- **guard-bash** blocks `rm -rf` on `/`, `~` or paths outside the session folder, force pushes to main, and `DROP`, `TRUNCATE` or `DELETE` without `WHERE` sent to a database.
- **guard-prod-writes** blocks any write to a remote database that isn't in a SQL file which was dry-run with `ROLLBACK` in the last three hours. I added it after loading 36 agent-made rows into production without reading them. 19 of them contained client names and domains.
- **model-guard** blocks subagents started on a model my rules don't allow.

Each robot run also has a lock so two runs can't overlap, a timeout (90 minutes by default) and a log. Anything that ships goes through a separate reviewer agent first.

For a long job with nobody watching where you do want bypass mode: a container, a throwaway checkout, no production credentials, and a review of the result before anything merges.