You know the rhythm. Claude Code suggests an edit — you hit approve. It wants to run dotnet build — approve. Then dotnet test — approve. It reads a file — approve. Another edit — approve. A refactoring session turns into a clicking exercise.

I’ve caught myself approving commands without even reading them. At that point, the permission system isn’t protecting me. It’s just slowing me down.

Auto Mode fixes this.


What Auto Mode actually is

Auto Mode is a permission mode in Claude Code that lets Claude execute actions without asking you first. But unlike --dangerously-skip-permissions (which disables all safety checks), Auto Mode runs a background classifier that reviews every action before it executes.

Think of it as a security guard who knows your project. It waves through your daily routines — editing files, running builds, executing tests — but stops anything that looks like it could do real damage. A dotnet build? Fine. A curl | bash from an untrusted URL? Blocked.

The classifier runs on Claude Sonnet 4.6 as a separate model call. It sees your conversation and the pending action, but not the raw tool results — so hostile content in a file or web page can’t trick it into approving something dangerous.


Why this matters for .NET developers

A typical .NET workflow with Claude Code goes like this: you ask Claude to refactor a service class, add unit tests, and run the test suite. That’s easily 15-20 permission prompts in a session. Edit the interface, approve. Edit the implementation, approve. Create the test file, approve. Run dotnet test, approve. Fix a failing test, approve. Run tests again, approve.

With Auto Mode, that entire flow runs uninterrupted. Claude edits your files, runs dotnet build, executes dotnet test, reads the output, fixes what’s broken, and runs the tests again. You watch the progress, review the results, and step in only when you disagree with the direction.

This is especially powerful for:

  • Test-driven development. The red-green-refactor cycle requires constant back-and-forth between editing and running tests. Auto Mode lets Claude iterate through that cycle without you clicking approve on every step.
  • Large refactorings. Renaming a service across your solution, updating all the DI registrations, fixing the tests — that’s dozens of file edits and build commands. Auto Mode handles it as one continuous flow.
  • Exploring unfamiliar code. When Claude reads files, checks references, and navigates your solution structure, you don’t want to approve every Read call. Auto Mode lets Claude explore freely.

What gets blocked, what gets through

Auto Mode trusts your working directory and your repo’s configured remotes. Everything else is treated as external until you tell it otherwise.

Allowed by default:

  • File edits in your project directory
  • Running build and test commands (dotnet build, dotnet test)
  • Installing dependencies from your lock files
  • Reading .env files and using credentials with their matching APIs
  • Read-only HTTP requests
  • Pushing to your current branch or a branch Claude created

Blocked by default:

  • Downloading and executing remote code (curl | bash)
  • Sending sensitive data to unknown endpoints
  • Production deploys and database migrations
  • Mass deletion on cloud storage
  • Modifying IAM permissions or shared infrastructure
  • Force pushing or pushing directly to main
  • Destroying files that existed before the session

The blocked list is sensible. These are exactly the actions where you’d want a human in the loop — even if you were running the commands yourself.


How to enable it

Auto Mode requires a Team, Enterprise, or API plan (not Pro or Max), Claude Sonnet 4.6 or Opus 4.6, and the Anthropic API provider. If you’re on an eligible plan, enable it with:

claude --enable-auto-mode

After that, Auto Mode joins the Shift+Tab cycle. You press Shift+Tab to move through defaultacceptEditsplanauto. The status bar shows when Auto Mode is active.

You can also set it as your default mode in your settings:

{
  "permissions": {
    "defaultMode": "auto"
  }
}

In VS Code, click the mode indicator at the bottom of the prompt box — Auto Mode appears once your admin has enabled it.


When it falls back

Auto Mode isn’t a black box. When the classifier blocks an action, you see a notification. Blocked actions appear in /permissions under the “Recently denied” tab, where you can press r to retry with manual approval.

If the classifier blocks 3 actions in a row or 20 total in a session, Auto Mode pauses and Claude Code goes back to prompting. Approving a prompted action resumes Auto Mode. This is a safety net — if something is consistently getting blocked, there’s probably a reason.

In practice, I rarely hit these limits. The classifier is good at understanding what’s routine and what’s risky. When it does block something, it’s usually because I’m doing something genuinely unusual — like pushing to a remote I haven’t used before.


Configuring for your environment

If the classifier blocks actions that are routine for your team — say, deploying to a staging environment or writing to a specific S3 bucket — your admin can configure trusted infrastructure:

{
  "autoMode": {
    "environment": [
      "Trusted staging: deploy.staging.example.com",
      "Trusted bucket: s3://our-staging-bucket"
    ]
  }
}

This goes in your settings.json (not the shared project settings, for security). The classifier uses these hints to understand what’s normal for your setup.


Auto Mode vs the alternatives

Claude Code gives you a spectrum of permission modes:

ModeWhat it doesWhen to use it
defaultAsks for everythingSensitive work, getting started
acceptEditsAuto-approves file edits onlyQuick iteration with manual build control
planRead-only, proposes changes without making themExploring before committing to changes
autoAuto-approves with background safety checksLong sessions, TDD, refactoring
bypassPermissionsNo checks at allIsolated containers only

For most .NET development, I switch between acceptEdits and auto. When I’m building a new feature and want to stay hands-on, acceptEdits is enough. When I’m in a refactoring session or running TDD cycles, Auto Mode saves me from clicking approve on the same dotnet test command for the fiftieth time.


Try it yourself

Next time you start a refactoring session or a TDD cycle, enable Auto Mode:

claude --enable-auto-mode

Press Shift+Tab until you see the auto indicator. Then give Claude a meaty task — refactor a service, add tests for an untested class, rename something across your solution.

Watch how it works through the problem without stopping every three seconds. Check the results when it’s done. If something went wrong, git diff shows exactly what changed, and git checkout . undoes everything.

The first time Claude runs through a complete red-green-refactor cycle without a single permission prompt, you’ll realize how much time you spent clicking approve on commands you were always going to approve anyway.