What "without approvals" can mean
Claude Code has six permission modes. Here is what runs without asking in each, from Anthropic's table (permission modes):
| Mode | What runs without asking | Anthropic's suggested use |
|---|---|---|
default (Manual) | File reads inside your working directories, plus actions that need no approval | Sensitive work, unfamiliar code |
acceptEdits | Reads, file edits, and common filesystem commands such as mkdir, touch, mv and cp | Iterating on code you are reviewing |
plan | Reads, plus classifier-approved commands when auto mode is available | Exploring a codebase before changing it |
auto | Everything, with background safety checks | Long tasks, reducing prompt fatigue |
dontAsk | File reads in your working directories and pre-approved tools. Anything that would prompt is denied | Locked-down CI and scripts |
bypassPermissions | Everything | Isolated containers and VMs only |
So "no approvals" is two different things. auto swaps you for a reviewer. bypassPermissions removes the review.
Auto mode: fewer prompts, still a check
In auto mode a separate classifier model reviews actions before they run and blocks the ones it judges risky. The docs say it looks for actions that go beyond your request, target unrecognized infrastructure, or follow hostile content Claude read. From Claude Code v2.1.283 it is the built-in starting mode for interactive terminal and VS Code sessions.
Anthropic is direct about the limit: auto mode "reduces permission prompts but does not guarantee safety," and is for tasks where you trust the general direction, not for sensitive operations. If the classifier blocks an action 3 times in a row or 20 times in total, Claude Code pauses auto mode and goes back to prompting.
Bypass mode: what it still blocks, and what it does not
You start it with claude --permission-mode bypassPermissions or the older --dangerously-skip-permissions flag. It disables permission prompts and safety checks, including for writes to protected paths such as .git and .claude. The docs warn that it "offers no protection against prompt injection or unintended actions." Prompt injection means text the agent reads, such as a web page, an issue or a cloned repo's files, carries instructions the agent then follows.
What still applies in bypass mode:
- Deny rules still block, in every mode.
- Allow rules do nothing, because everything is already allowed.
- A short list of actions no mode auto-approves still ends in a prompt or a denial, including recognized
rmandrmdirremovals of critical paths. - On Linux and macOS it refuses to start as root or under
sudo, unless it is inside a recognized sandbox. - A repository cannot turn it on for you. If
bypassPermissionsis set asdefaultModein.claude/settings.jsonor.claude/settings.local.json, it does not take effect and the session starts in Manual mode.
Where it is reasonable
Inside a container or VM that holds nothing you would mind losing, on a repo you trust. Anthropic's dev container docs allow --dangerously-skip-permissions for unattended work there, run as a non-root user, and then add a warning: a malicious project can still exfiltrate anything reachable inside the container, including the Claude Code credentials in ~/.claude (dev containers). So:
- Do not mount
~/.sshor cloud credential files into the container. - Use repository-scoped or short-lived tokens.
- Limit outbound network access, as the dev container setup does with its firewall script.
On your everyday laptop, with your cloud logins and keys in reach, skip it.
A safer starting setup
Put this in ~/.claude/settings.json, then test it on a throwaway project first:
{
"permissions": {
"deny": ["Read(./.env)", "Read(./.env.*)"],
"disableBypassPermissionsMode": "disable"
},
"sandbox": {
"enabled": true,
"allowUnsandboxedCommands": false
}
}disableBypassPermissionsMode stops anyone from entering bypass mode, and a session started with the flag opens in another mode. Admins normally set it in managed settings. In your own user file it is a seatbelt for you, not a policy. The sandbox is off by default, sandbox.enabled turns it on, and allowUnsandboxedCommands: false removes the retry-outside-the-sandbox escape hatch.
To check a settings file you already have, paste it into the free Claude Code settings scanner. It runs in your browser and flags wide allow rules, saved secrets and missing guardrails.
Fewer prompts without bypass
- Use auto mode, or
acceptEditswhen you are reviewing the diff anyway. - Turn on the sandbox with
/sandbox. In auto-allow mode, sandboxed commands run without a prompt, while deny rules and ask rules likeBash(git push *)still apply. - Add narrow allow rules for commands you run all day, such as
Bash(npm run test *), instead of allowing everything. - For a session nobody is watching, set
permissions.denyInsteadOfPromptingtotruein your user or managed settings, or usedontAskmode. Calls that would have prompted are denied and the session keeps going.
The sandbox wraps shell commands only. Claude's file tools, local MCP servers and hooks run outside it, so keep deny rules and an MCP review in place too.
Quick follow-ups
Does --dangerously-skip-permissions turn off my deny rules?
No. Anthropic's docs say deny rules block in every mode, including bypassPermissions. Allow rules have no effect in that mode, because everything is already allowed.
Can I use it inside Docker?
Anthropic's dev container setup is built for it, with a non-root user. The docs still warn that a malicious project can exfiltrate anything reachable inside the container, so keep host secrets out of it and limit network access.
Can a repo I clone switch bypass mode on?
No. If bypassPermissions is set as defaultMode in a project's .claude/settings.json or .claude/settings.local.json, it does not take effect and the session starts in Manual mode.
Sources
- Claude Code: Choose a permission mode
- Claude Code: Configure permissions
- Claude Code: Settings reference (disableBypassPermissionsMode, denyInsteadOfPrompting)
- Claude Code: Development containers
- Claude Code: Configure the sandboxed Bash tool
See also the glossary and the other questions.
