How to teach Claude Code auto mode about your environment with /auto-mode-setup
In Claude Code auto mode, a classifier judges whether each action is risky. When it doesn't know your GitHub org or internal services, it can block even a push to your own repository. /auto-mode-setup reads your project and recent sessions and drafts autoMode.environment entries. Starting with 2.1.304, released October 19, it also works on Bedrock, Vertex, Foundry, the Claude apps gateway and telemetry-disabled sessions.
- Open Claude Code in your project folder and run the command.
/auto-mode-setup
-
Answer the question about how you use this project, then choose whether to allow two optional scans: the first word of each command in your shell history, and the remote hosts and names of repositories under your home directory. Without them it reads only this project's
CLAUDE.md,README.md, config files and git remotes, your existingautoModeandpermissions.allowsettings, and the hosts, buckets and command names from commands run in recent sessions here. It never reads your messages. -
Accept or discard the draft as a whole. Accepting writes it to
~/.claude/settings.json; edit that file to adjust single entries. After saving, it offers to removepermissions.allowrules that auto mode ignores, such asBash(*). -
Check the effective result.
claude auto-mode config
Per the docs it requires a Pro, Max or Team plan and v2.1.228 or later, and it can't run in a cloud session. To turn off both the command and the automatic offer, add this to ~/.claude/settings.json.
{
"skillOverrides": {
"auto-mode-setup": "off"
}
}
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.