NewThe Mac app is out for Apple SiliconGet it →
Fenzi
blog, permissions

Is Claude Code auto mode safe?

Safer than skipping permissions, and less careful than a person who reads every prompt. In auto mode a second model reviews each risky action and blocks what looks destructive or outside your request, but Anthropic measured it letting 17% of real overeager actions through, and it allows pushes, .env reads and declared installs by default. Use it as a filter on the agent's judgment, with ask and deny rules for what you cannot undo and a boundary around the process for what it can reach.

By Boris Kwemo, , six-minute read

Many people run auto mode without having picked it. Anthropic's permission modes page says that since Claude Code v2.1.283 it is the mode interactive terminal and VS Code sessions start in, on every plan. So the question is less whether to try it and more what it does while you are not looking.

What auto mode does

Auto mode replaces most permission prompts with a classifier: a separate model that reviews an action before it runs and blocks it, or lets it through.

Each action goes through a fixed order. Your allow, ask and deny rules decide first. Reads and file edits inside your working directory are approved outright. Everything else, such as shell commands, web fetches, MCP tools and subagents, goes to the classifier.

Two details make it harder to fool than a prompt you click through. On entering auto mode, Claude Code drops broad allow rules that amount to running anything, such as Bash(*), wildcarded interpreters like Bash(python*) and package manager run commands, while narrow ones like Bash(npm test) stay.

And the classifier reads your messages and the agent's tool calls, but not the files and pages the agent read, nor the agent's own explanation. A planted instruction cannot address the classifier directly, and the agent cannot talk it into a yes.

When it blocks, the agent gets the reason and looks for a safer route. After 3 blocks in a row or 20 in a session, auto mode pauses and Claude Code goes back to asking you, which is where the human in the loop comes back. Our notes on how Claude Code permissions work cover the rules that sit in front of it.

What it blocks and what it lets through

By default the classifier trusts your working directory and the git remotes configured when the session started. Everything else counts as external. The full lists are long; these rows come from the permission modes page, and claude auto-mode defaults prints the rules built into your version.

Blocked by defaultAllowed by default
Downloading and running code, like curl | bashFile operations in your working directory
Sending sensitive data to outside endpointsInstalling dependencies declared in your lock files or manifests
Production deploys and migrations, terraform destroyReading .env and sending credentials to their matching API
Force push, git reset --hard, git clean -fdRead-only HTTP requests
Merging a pull request no person approvedPushing to any branch of the repository, the default branch included
Printing a live credential into the transcript or a fileData sent to domains and buckets you list as trusted

The right column is where to look twice. A push to main needs no prompt unless the push falls under a block rule, so branch protection on the remote is still your last check. And a read-only request can carry data in its address, which is why the third leg of the lethal trifecta is any way out, not only a write.

How often it misses

Anthropic published its own numbers in March 2026, in How we built Claude Code auto mode, measured on three sets of actions.

On 10,000 real tool calls from its staff, the full pipeline blocked 0.4% of harmless actions. On 1,000 synthetic attempts to send data out, it let 5.7% through. On 52 real overeager actions, where the agent went past what the person asked, it let 17% through.

The 17% false-negative rate on real overeager actions is the honest number.Anthropic Engineering, How we built Claude Code auto mode

The same post says why. In most misses the classifier saw the danger, the force push or the deletion, and misread something said earlier as consent for it: "clean up the PR" does not name a force push.

Anthropic puts the trade plainly: against skipping permissions, auto mode is a large improvement; against a person who reads every prompt with care, it can be a step back. The docs carry the short version: auto mode "does not guarantee safety."

"Auto mode is skip permissions, made safe."

Revision 1: it catches most bad actions, so it is safer than no checks and still not a boundary.

Where it is weaker than it looks

Words in the session move it both ways. Say "don't push" and the classifier blocks pushes, but the boundary lives only in the transcript, and the docs warn that context compaction can remove the message that stated it. Name an action specifically, such as a force push to one branch, and that counts as approval for it.

Rules you already have skip it. A narrow allow rule is resolved before the classifier runs. The auto mode configuration page notes that such a rule can still let a destructive argument through that its prefix did not anticipate.

Unattended runs have no one to fall back to. In a claude -p run without a prompt tool, reaching the block threshold means the action does not run and Claude keeps working. Nobody is asked.

It decides whether, not what. The classifier judges each action; it does not limit what an approved command can read or reach. Anthropic's page on the sandboxed Bash tool draws the line: auto mode controls whether each tool call runs, the sandbox controls what a command can access once it runs.

Without a sandbox, an approved command runs as you, with your home folder, your keys and your network.

Injection still has a path. The classifier never sees the planted text, but the agent does. An instruction hidden in a README that steers the agent toward an action the classifier finds plausible can pass, which is why the prompt injection examples from real advisories still apply here.

How to tighten it

Keep auto mode for the routine work and put hard rules where it is weakest. An ask rule forces a prompt that the classifier cannot approve for you; a deny rule blocks before it is consulted. The autoMode block adds your own rules to the classifier, with "$defaults" kept in each list, and classifyAllShell sends shell commands to the classifier even when an allow rule matches.

{
  "permissions": {
    "ask": ["Bash(git push *)", "Bash(gh pr create *)"]
  },
  "autoMode": {
    "classifyAllShell": true,
    "soft_deny": [
      "$defaults",
      "Never run database migrations outside the migrations CLI"
    ]
  }
}

Put the autoMode block in ~/.claude/settings.json or managed settings. Claude Code ignores it in a project's .claude/settings.json, so a repository cannot write its own allow rules. Ask rules match the command as written, so git -C dir push slips past the rule above; a PreToolUse hook can inspect the full text.

For a team, two more settings matter. A developer's personal allow entry can override an organization's soft_deny, so a block that must hold belongs in permissions.deny in managed settings. And an administrator can turn auto mode off for everyone with disableAutoMode set to "disable".

For what a command can reach once approved, turn on the Bash sandbox with /sandbox and add denyRead entries for your credential files. Whatever you choose, the rule we keep in agentic AI security applies: the limits sit outside the model, and a person approves more.

A side note on how we do it

We build Fenzi, which starts Claude Code inside an OpenShell sandbox: the folders are fixed when it starts, a host outside the policy is refused, and a request for a new one waits for a person, as the requests and approvals sheet describes. Nothing said in the session can widen it. A container with a default-deny firewall, and a person who edits its list, answers the same question.

So, is auto mode safe?

It is a sensible default for work you trust in direction: it stops most destructive and outward actions and keeps you out of a long run of prompts you would approve without reading. It is not a boundary. It misses some overeager actions, it allows pushes and credential use by default, and it does not limit what an approved command can reach.

Add ask and deny rules for what you cannot undo, and a sandbox or container for the rest. Anthropic's page on sandbox environments is the place to start.

One line to install.
One command to run.

curl -fsSL https://fenzi.dev/install.sh | sh

Then fenzi run claude. Ask it to open a pull request with the GitHub API, and watch the deny land.