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.
Bypass mode skips permission prompts and the safety checks around them, including writes to protected paths. Allow rules stop mattering, because everything is allowed.
A few things still prompt or refuse even in bypass mode:
permissions.deny is blocked in every mode.ask rules.rm and rmdir.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.
Bypass mode makes sense when the environment itself limits the damage:
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.
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:
{
"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 laptop sessions and the robots both run in auto mode, with these hooks in ~/.claude/settings.json:
rm -rf on /, ~ or paths outside the session folder, force pushes to main, and DROP, TRUNCATE or DELETE without WHERE sent to a database.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.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.
New essays like this one, by email. No schedule, no slop.