← 所有文章
claudeClaude Code

Stop Clicking "Allow" Every 10 Seconds in Claude Code

You ask Claude to refactor a module and then spend the next twenty minutes clicking "Allow" on every file read, every edit, every git command. By the time it's done, you've approved forty permission dialogs and lost whatever flow state you had.
Auto mode fixes this. A separate classifier reviews each action before it runs, blocking anything risky and letting safe operations through without asking you.

What You'll Learn


How It Works

Auto mode adds a classifier between Claude's intent and the actual execution. When Claude wants to run a command, the classifier checks it against a set of rules before it executes.
Safe actions — reading files, running tests, editing code in your working directory — go through silently. Risky actions — force-pushing, writing to unknown URLs, running curl | bash — get blocked.
You don't see the safe ones at all. That's the point. Instead of forty permission dialogs, you might see one or two blocks for genuinely unusual operations.

The Classifier Isn't Just Pattern Matching

Here's what surprised me: the classifier reads your CLAUDE.md. If your project's CLAUDE.md says "never force push," the classifier enforces that too. It's not a separate rule system — it shares context with Claude itself.
Even more useful: conversational boundaries work. If you tell Claude "don't push until I review the diff," the classifier blocks push attempts even though pushing is normally allowed. The boundary stays active until you explicitly lift it.

💡 This means you can be specific about what you're comfortable with for each task. "Refactor this module but don't touch the database migrations" — the classifier respects that.


Telling It What You Trust

Out of the box, the classifier only trusts your working directory and your repo's remotes. Pushing to your company's GitHub org? Blocked. Writing to your team's S3 bucket? Blocked.
Fix this by adding your infrastructure to autoMode.environment in settings:

{
  "autoMode": {
    "environment": [
      "$defaults",
      "Source control: github.com/my-org and all repos under it",
      "Trusted buckets: s3://my-team-artifacts",
      "Internal services: ci.mycompany.com"
    ]
  }
}

Entries are natural language, not regex. Write them like you'd explain your infrastructure to a new teammate. $defaults keeps the built-in trust list; omitting it replaces the entire list.

When the Classifier Gets It Wrong

It will. Especially at first, before you've told it about your infrastructure.
When an action is blocked, it shows up in /permissions under the "Recently denied" tab. Press r on a denied action to retry it. If the same thing keeps getting blocked, add that destination to your autoMode.environment.
You can also use the PermissionDenied hook to handle denials programmatically — return retry: true and Claude tries a different approach automatically.

⚠️ Auto mode is a research preview. It reduces permission prompts but doesn't guarantee safety. Don't use it as a replacement for reviewing sensitive operations.


Requirements

❌ Auto mode won't help if you're on a Pro plan. You'll need to upgrade to Max or use the API.


The goal isn't to remove all permission prompts. It's to remove the ones that were never protecting you in the first place.

← 所有文章OctoDock 首頁 →