Claude Code Adds /auto-mode-setup to Tune Auto Mode to Your Project

Claude CodeView original changelog

Claude Code v2.1.304 adds /auto-mode-setup, a guided command that reads a project and its recent sessions to draft auto mode environment entries. It teaches the auto mode classifier which hosts, buckets and commands are trusted infrastructure, so fewer routine actions get blocked. The command is now also available on Bedrock, Vertex, Foundry, the Claude apps gateway and telemetry-disabled sessions.

Key Takeaways

  • /auto-mode-setup drafts autoMode.environment entries from the project and recent sessions, replacing hand-written configuration.
  • The scan reads hosts, buckets and command names from recent commands, never user messages, according to the documentation.
  • The draft is only written to the user's settings after the user accepts it.
  • Existing autoMode entries are respected: the command asks whether to add or replace and keeps hand-written rules.
  • The command now works on Bedrock, Vertex, Foundry, the Claude apps gateway and telemetry-disabled sessions.
  • The result can be inspected afterward with claude auto-mode config.

A guided way to teach auto mode about your environment

Auto mode relies on a classifier that judges each tool call, and out of the box it knows nothing about a team's internal hosts, buckets or deploy commands. Claude Code v2.1.304 adds /auto-mode-setup, a guided command that drafts that context so users no longer have to write autoMode.environment entries by hand.

When run, Claude Code reads the project's CLAUDE.md, README.md, config files and git remotes, together with the user's existing autoMode and permissions.allow settings. It also looks at the hosts, buckets and command names from commands Claude ran in recent sessions in that project. The documentation states that it reads those commands, never the user's messages. Claude Code asks how the project is used and offers two optional scans before it scans anything. If the draft is accepted, it is written to the user's settings.

If autoMode entries already exist, Claude Code first asks whether to add to the environment list or replace it, and keeps any rules the user wrote either way. The result can be inspected afterward with claude auto-mode config.

Wider availability

The command was previously limited to first-party setups. As of v2.1.304 it is also available on Amazon Bedrock, Google Vertex AI, Microsoft Foundry, the Claude apps gateway, and sessions with telemetry disabled.

Why it matters

Auto mode trades per-action approval prompts for a classifier. The practical friction is false blocks on legitimate internal infrastructure, such as a private package registry or a staging bucket. A guided setup built from real session history gives the classifier concrete trusted destinations, which should reduce unnecessary interruptions while keeping the safeguards on pushes, force pushes and secrets leaving the repository.