What --dangerously-skip-permissions does in Claude Code, and safer options
Updated 17 November 2026
The flag starts Claude Code in bypassPermissions mode, which skips permission prompts and safety checks so every edit and command runs without asking. Anthropic's docs say to use it only in isolated environments such as containers or VMs. For everyday work, acceptEdits, allow rules, auto mode or the sandbox remove most prompts with far less risk.
claude --dangerously-skip-permissions is the same as claude --permission-mode bypassPermissions. Claude Code stops asking before it edits files, runs shell commands or uses the network. People reach for it because the prompts get tiring, and there are better fixes for that.
The behaviour described here is from the permission modes page of the Claude Code docs.
What exactly does it turn off?
In bypassPermissions mode Claude Code skips the permission prompts and the safety checks behind them. That includes writes to protected paths, which every other mode guards: .git, .vscode, .claude, your shell rc files such as .zshrc, .npmrc, .mcp.json and others.
The docs put the warning plainly: the mode offers no protection against prompt injection or unintended actions. If Claude reads a web page or a file that contains instructions written to mislead it, nothing stands between that text and your shell.
What still stops it?
A short list of things prompt or are denied even in this mode:
- Deny rules. A deny rule in your settings blocks in every mode, including this one.
- Explicit ask rules. A tool matched by an ask rule still prompts.
- Critical-path removals. Recognised
rmandrmdircommands aimed at the filesystem root, your home directory, or the working directory and its parents. - PreToolUse hooks that deny. A hook returning
permissionDecision: "deny"blocks the tool even with--dangerously-skip-permissions. - Questions to you.
AskUserQuestionand MCP tools marked as needing user interaction.
The docs note that the critical-path check can miss some commands, so treat it as a backstop and still isolate the machine.
What else should I know before using it?
- You cannot switch into it mid-session unless it was enabled at launch.
--allow-dangerously-skip-permissionsadds it to theShift+Tabcycle without turning it on. - The first launch shows a warning dialog. Accepting it writes
"skipDangerousModePermissionPrompt": trueto~/.claude/settings.json. Declining exits. - It refuses to run as root. On macOS and Linux you get
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons, unless Claude Code detects a sandbox. - Setting it as a default has limits.
"defaultMode": "bypassPermissions"only takes effect from~/.claude/settings.json, not from a project’s settings files. - Admins can block it with
permissions.disableBypassPermissionsModeset to"disable"in managed settings. - A resumed session does not come back in bypass. You have to pass the flag again.
When is it reasonable?
When the machine is disposable. The docs name containers, VMs and dev containers without internet access. In that setup the worst outcome is a ruined container, and you throw it away.
On your own Mac, with your SSH keys, cloud credentials and every other repository within reach, the worst outcome is much larger than the time the prompts cost you.
What are the safer ways to get fewer prompts?
Each of these removes a class of prompt while leaving something in place to catch a mistake.
1. acceptEdits mode
claude --permission-mode acceptEdits
File edits in the working directory run without asking, along with mkdir, touch, rm, rmdir, mv, cp and sed. Other shell commands still prompt. Since edits are easy to review in a diff, this covers most of the noise in a normal coding session.
2. Allow rules for commands you always approve
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git commit *)"
],
"deny": [
"Bash(git push *)"
]
}
}
Your test, lint and build commands stop prompting, and the rest still asks. The syntax is covered in permission rules in settings.json.
3. Auto mode
claude --permission-mode auto
A classifier reviews each action before it runs and blocks things like curl | bash, force pushes, git reset --hard and production deploys. You get close to the same lack of prompts, with a check still running. The docs warn that it does not guarantee safety, and after three blocks in a row it goes back to prompting.
4. The sandbox
Run /sandbox in a session, or set it in ~/.claude/settings.json:
{
"sandbox": {
"enabled": true
}
}
The sandbox is enforced by macOS on the shell commands Claude runs. By default they can write only to the working directory and a temp directory, and network connections go through a proxy with an allowlist that starts empty. In its auto-allow mode, sandboxed commands run without a prompt because the boundary contains them.
One caution from the docs: by default the sandbox still allows reads across most of the machine, including credential files such as ~/.ssh. It limits writes and network access.
5. dontAsk for unattended runs
If the reason for the flag is a script or CI job where nobody can answer, dontAsk is the mode built for that. Anything that would prompt is denied, and you list what is allowed:
claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"
How do the options compare?
| Option | Prompts left | What still protects you |
|---|---|---|
bypassPermissions |
Almost none | Deny rules, ask rules, critical-path removals |
acceptEdits |
Shell commands | Everything except edit prompts |
| Allow rules | Whatever you did not allow | The prompt, for everything else |
auto |
Few | A classifier on every action |
| Sandbox, auto-allow | Few | An OS-level boundary on shell commands |
All of these are described side by side in Claude Code permission modes explained.
What if the problem is walking back to the terminal?
Often the prompts are fine, and the trouble is where they appear. Claude asks in a terminal you are not looking at, the work stalls, and skipping every check starts to look attractive.
If that is your situation, you can keep the checks and move the prompt. NotchDaddy shows each Claude Code permission request in the MacBook notch with the exact command, and you answer with Allow or Deny, or a keyboard shortcut, from whatever app you are in. A request you do not answer goes back to the terminal prompt and is never approved for you.
You do not need it if the options above bring the prompts down to a level you can live with. They are free and built in. The approval flow is described in approving Claude Code from the notch.
Start a 3-day trial for $0, then $19 once for 2 Macs.