Skip to content
← Back to release · 2.1.304
New features / v2.1.304

Add /auto-mode-setup guided setup

CHANGELOG · original

Added /auto-mode-setup: a guided setup that reads your project and recent sessions to teach auto mode about your environment, now also available on Bedrock, Vertex, Foundry, Claude apps gateway and telemetry-disabled sessions
Open official changelog ↗

Documentation

Documentation excerpt

Generate environment entries with /auto-mode-setup

Run /auto-mode-setup to have Claude Code draft autoMode.environment entries, and sometimes rule entries too, from your project and your recent sessions in it. If you accept the draft, Claude Code writes it to ~/.claude/settings.json.

[!NOTE]

/auto-mode-setup is available on Pro, Max, Ultra, Team, and Enterprise plans and with a Claude Console API key. On a Pro, Max, Ultra, or Team plan, you need v2.1.228 or later, or v2.1.233 or later on native Windows. On an Enterprise plan or with a Claude Console API key, you need v2.1.283 or later. If the command is missing from your session, see /auto-mode-setup returns "Unknown command".

What /auto-mode-setup reads

If ~/.claude/settings.json already holds autoMode entries, Claude Code starts by asking whether to add to your environment list or replace it, and keeps the rules you wrote either way. Claude Code then asks how you use this project and offers two optional scans before it scans anything. In the scan, Claude Code always reads these sources:

  • This project's CLAUDE.md, README.md, config files, and git remotes
  • Your autoMode and permissions.allow settings
  • The hosts, buckets, and command names from the commands Claude ran in your recent sessions in this project, never your messages

The two optional scans add one source each:

  • The first word of each command in your shell history
  • The remote hosts and names of the repositories under your home directory

Review and save the draft

Claude Code scans in the background, then shows you the draft. You accept or discard it as a whole, so edit ~/.claude/settings.json afterwards to adjust single entries. When you accept, Claude Code writes the draft and reconciles it with the settings you already have:

  • If you chose to add to the environment list in ~/.claude/settings.json, you keep any "$defaults" entry in it. If you chose to replace that list, you lose that entry, so add "$defaults" back if you want the default entries
  • Claude Code includes "$defaults" in each of the allow, soft_deny, and hard_deny lists the draft adds entries to, unless you already wrote an allow list without it, so the built-in rules you haven't replaced stay in effect
  • After saving, Claude Code offers to remove permissions.allow rules in ~/.claude/settings.json that auto mode ignores, such as Bash(*), or that auto-approve destructive commands

Then run claude auto-mode config to see the result.

Turn off /auto-mode-setup

Once auto mode has blocked several actions and you still have no autoMode.environment entries, Claude Code shows a dialog titled "Teach auto mode about your environment?" at the end of a turn and offers to run /auto-mode-setup for you. To stop the offer but keep the command, select Don't show again in that dialog.

To turn off both the command and the offer, add this skillOverrides entry to ~/.claude/settings.json:

{
  "skillOverrides": {
    "auto-mode-setup": "off"
  }
}

/auto-mode-setup is a built-in command rather than a bundled skill, so this skillOverrides entry still applies to it, but disableBundledSkills doesn't turn it off.

/auto-mode-setup returns "Unknown command"

If typing /auto-mode-setup at the Claude Code prompt prints Unknown command: /auto-mode-setup, check for these causes:

In a cloud session, the command prints /auto-mode-setup isn't available in this environment. instead. Run it in an interactive session in your terminal.

Documentation snapshot · 2026-11-20

Change details