Claude Code permissions decide what Claude can do without asking you first. You control them two ways: a permission mode (how cautious the whole session is) and allow, ask and deny rules in settings.json (exactly which commands and files are fair game).
Then there’s --dangerously-skip-permissions, which turns the prompts off. It’s fast. Anthropic says to use it only in isolated environments like containers or VMs, and I’ll explain why below.
I run Claude Code agents on a Mac Mini at home that handles scheduled jobs for about 30 WordPress sites, my email lists and my reporting dashboards. I’ve run it in bypass mode for speed. So this isn’t theory for me.
The 6 Claude Code permission modes
Every session you start runs in one mode. Here’s what each one lets through without asking you:
| Mode | Runs without asking | Good for |
|---|---|---|
default (shown as Manual) | Reads only | Reviewing every action yourself |
acceptEdits | Reads, file edits, and common file commands like mkdir, mv and cp inside your working folders | Coding while you watch the diffs |
plan | Reads and read-only commands. No edits until you approve a plan | Exploring before changing anything |
auto | Everything, with a background classifier checking each action | Long tasks with fewer prompts |
dontAsk | Only pre-approved tools. Anything that would prompt is denied | Locked-down scripts and CI |
bypassPermissions | Everything | Isolated containers and VMs only |
Auto mode is the one most people should look at first. From version 2.1.283 on, it’s the starting mode for interactive terminal and VS Code sessions on every plan. It blocks actions that go beyond what you asked for, or that look like they came from hostile content you fed it. If it blocks something 3 times in a row or 20 times total, it pauses and goes back to asking you.
Is auto mode safe? Anthropic’s own wording is that it reduces prompts but doesn’t guarantee safety. Fair enough.
How to switch modes
- Press
Shift+Tabin the CLI to cycle through the everyday modes (auto is in there too, if your plan and model have it). The status bar shows which one you’re in. - Start a session in a mode with
claude --permission-mode plan(or any mode name). - Set your usual starting mode with
permissions.defaultModein your settings.
Two modes don’t show up in the Shift+Tab cycle by default. dontAsk never does, so you start it with the flag. bypassPermissions only joins the cycle if you launched with one of its flags.
Allow, ask and deny rules
Modes are your big dial. Rules are your fine control. Each rule is a tool name, with an optional pattern in parentheses:
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git commit *)"
],
"ask": [
"Bash(git push *)"
],
"deny": [
"Read(./.env)",
"Read(./secrets/**)"
]
}
}
That setup lets Claude run your npm scripts and make commits on its own, makes it ask before any push, and keeps it out of your .env file and secrets folder.
The order matters more than anything else here. Claude Code checks deny first, then ask, then allow, and the first match wins. A narrow allow rule can’t carve a hole in a broad deny rule. So if you deny Bash(aws *), an allow for Bash(aws s3 ls) does nothing.
Where the rules live
| File | Who it applies to |
|---|---|
~/.claude/settings.json | You, in every project |
.claude/settings.json | Everyone on the project (check it into git) |
.claude/settings.local.json | You, in this project only. “Yes, and don’t ask again” saves here |
| Managed settings | Set by an admin. Nothing else can override them |
A deny at any level wins. If your user settings allow something and the project denies it, it’s blocked. The reverse works too.
The easiest way to see all of it is the /permissions command. It lists every rule and which file it came from, and you can add or remove rules right there.
Rules that don’t do what you think
This is where people get burned. A few things worth knowing before you trust a rule:
- Put the
*after the subcommand.Bash(git log *)allows onlygit log.Bash(git *)allows every git command, push included. - Bash rules match the command text.
Bash(curl *)doesn’t catch/usr/bin/curlorsh -c 'curl ...'. For a real wall on files and network, you want the Claude Code sandbox. - Paths in Read and Edit rules are tricky.
/Users/you/fileisn’t an absolute path in a rule. Use//Users/you/filefor that, or~/for your home folder. - Your CLAUDE.md doesn’t enforce anything. Instructions there shape what Claude tries to do. Only your rules and modes change what Claude Code actually allows you to skip.
What –dangerously-skip-permissions really does
claude --dangerously-skip-permissions is the same as claude --permission-mode bypassPermissions. Tool calls run right away, with no prompt.
That includes writes to protected paths like .git and .claude, which every other mode would at least stop and check. So Claude can change its own settings folder without asking.
A few things still stop it, even here:
- Your explicit ask rules still prompt.
- Removals that Claude Code recognizes as hitting critical paths (with
rmorrmdir) still prompt. - On a Mac or Linux, it refuses to start as root or under
sudo. - The first time you start it, you get a warning dialog. Decline and it exits.
That first item is the useful one. Even in bypass mode, an ask rule for something like Bash(git push *) keeps a human in the loop for the one action you really care about.
There’s also --allow-dangerously-skip-permissions. It adds bypass to the Shift+Tab cycle without turning it on, so you can start safe and flip to it only when you mean to.
When to skip permissions (and when not to)
Here’s my honest take. Bypass mode is great when the thing it can damage is small and backed up. It’s a bad idea anywhere it can reach something you can’t get back.
Anthropic’s recommendation is plain: run --dangerously-skip-permissions inside a container or a VM (or its sandbox runtime), so everything Claude Code touches is inside the wall too. Their dev container setup runs as a non-root user with an outbound firewall for exactly this reason.
When I’ve used bypass mode, two habits did the heavy lifting. I keep backups before edits, so a bad change is a restore and not a rebuild. And I give the agent scoped helper scripts for the risky jobs, so it calls one tool that does one thing instead of writing its own commands against live systems.
Why so careful? In April 2026 a startup founder said a Cursor coding agent deleted his production database and its backups on Railway in nine seconds. That wasn’t Claude Code, but it’s the same kind of tool with the same kind of access.
A setup I’d start with
- Back up the machine first. On a Mac, Time Machine is the easy place to start.
- Use auto mode or
acceptEditsfor day-to-day work instead of bypass. - Add deny rules for your
.envfiles and your SSH keys. - Add ask rules for anything that reaches other people or can’t be undone, like
Bash(git push *). - Turn on the sandbox with
/sandboxso shell commands can’t wander. - If you really need hands-off runs, do them in a dev container or VM, not on your main Mac.
- Don’t trust yourself? Set
permissions.disableBypassPermissionsModeto"disable"in your own settings and you’re locked out of bypass mode.
None of this is special to Claude Code, by the way. The same guardrails apply to any AI agent you let near your business: least access, a gate on anything you can’t undo, and a backup it can’t reach.
FAQ
How do I stop Claude Code from asking for permission every time?
Pick “Yes, and don’t ask again” on a prompt, or add allow rules with /permissions. Auto mode cuts most of the rest. Turning on the sandbox also lets sandboxed shell commands run without prompts.
Is –dangerously-skip-permissions safe?
Not on its own. It removes your chance to review anything before it runs. Use it inside a container or VM with backups. And keep ask rules on anything you can’t undo.
Can a project’s settings turn on bypass mode for me?
No. A project’s .claude/settings.json or .claude/settings.local.json can’t start a session in auto or bypass mode.
What’s the difference between permissions and the sandbox?
Permissions decide whether an action runs and whether you get asked. The sandbox limits what a shell command can touch once it runs. You want both.
Want this done for you?
I run Claude Code on my own Mac Mini, and I’m putting together a done-for-you setup for people who’d rather not spend a weekend on it. Join the waitlist and I’ll email you when spots open.
Running a business and want AI doing more of your marketing? See AI consulting.
