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-setupis 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-setupreturns "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
autoModeandpermissions.allowsettings - 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
environmentlist 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 theallow,soft_deny, andhard_denylists the draft adds entries to, unless you already wrote anallowlist without it, so the built-in rules you haven't replaced stay in effect - After saving, Claude Code offers to remove
permissions.allowrules in~/.claude/settings.jsonthat auto mode ignores, such asBash(*), 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:
- First session after an install or upgrade: start a new session. If the command is still missing there, see the setups where later sessions also start without it.
- Outdated version: run
claude --versionin your shell. If the version is below the minimum for your plan, update Claude Code. - Telemetry off, third-party provider, or Claude apps gateway: before v2.1.304, the command isn't available in sessions where feature-flag fetching is off. If your session is one of them, update Claude Code to v2.1.304 or later.
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