Claude Code v2.1.304: Wider /auto-mode-setup Availability, a Managed Agents Security Check, and Code Review Levels
Claude Code v2.1.304 extends /auto-mode-setup to Bedrock, Vertex, Foundry and more, adds a Managed Agents security comparison and Code Review levels, and fixes worktree, rm -r and compaction issues.
Claude Code v2.1.304 is a large release with 76 changelog entries. It makes the guided /auto-mode-setup available on more providers and session types, adds /claude-api managed-agents-secure, a resume warning on Pro and Max plans, and review levels for Code Review, and turns tool search on by default behind a custom ANTHROPIC_BASE_URL. Among the fixes, claude --worktree no longer removes a worktree and its branch without asking in some cases, and rm -r of a mounted drive now gets a safety prompt.
What’s New
/auto-mode-setup on More Providers and Sessions
/auto-mode-setup is a guided setup that reads your project and recent sessions to teach auto mode about your environment. It is now also available on Bedrock, Vertex, Foundry, Claude apps gateway and telemetry-disabled sessions.
/claude-api managed-agents-secure
The new /claude-api managed-agents-secure compares a Managed Agents agent’s settings with Anthropic’s published security guide, without changing anything. The /claude-api skill also now uses the ant CLI on Claude Platform on AWS instead of falling back to the SDK or curl.
Resume Warning on Pro and Max Plans
On Pro and Max plans, Claude Code now warns you when resuming an inactive conversation would use a noticeable share of your 5-hour usage limit. You can resume anyway, or start a new conversation, and Claude can look up the previous one if you refer to it.
Tool Search On by Default Behind a Custom Base URL
Tool search is now on by default behind a custom ANTHROPIC_BASE_URL. If the gateway answers with a 400 or 422, the request is retried without it.
Skill List, Skill Hook Limits, and allowed-tools
After compaction, Claude is now sent the skill list again, and /reload-skills now sends only new or changed skills. The skills of one source (a repo, your own folder, or a plugin) can register at most 1,024 hooks and 16,384 matcher characters per session. Under a policy that allows hooks from plugins only, a skill used in the main conversation whose hooks are kept out no longer gets its allowed-tools.
CLAUDE_CODE_AUTO_COMPACT_WINDOW Accepts k and M Suffixes
CLAUDE_CODE_AUTO_COMPACT_WINDOW=200k no longer silently sets a 100K window. The variable now accepts k and M suffixes like --autocompact, and warns when a value is out of range or ignored.
Mod API Changes
- A mod’s
tool.checkanswer can includedecider: "person": only the permission dialog or a host’s callback can approve the ask, and where nobody can be asked, it is refused with the mod’s reason. - The
tool.checkevent now carriese.isReadOnly, set when the tool call is read-only. - Mods’
settings.readhooks now receive each settings layer and rewrite the merged settings, so a managed mod can make an organization’s setting a ceiling, including thecleanupPeriodDaysthe retention sweep uses. - When a plugin that runs first skips one of your mod’s hooks, the transcript now shows a line naming the event and the plugin.
Code Review Levels and Organization-Wide Coverage
Owners can now choose a Quick, Standard (the default), or Deep review level for the organization and give individual repositories their own level. Code Review admin settings also gain an option to review every repository in a GitHub organization, including ones added later, without selecting them one by one.
VS Code: Background Sub-Agents and Mod Drawing
Background sub-agents now show as one status line under their Agent card instead of streaming every step into the chat; the full transcript stays in /tasks. Mods can now draw in the chat panel for sessions on Amazon Bedrock, Google Vertex AI and Microsoft Foundry, behind an LLM gateway, or with telemetry turned off.
Fixes and Improvements
- Safety prompts:
claude --worktreeno longer removes the worktree and its branch without asking at exit when HEAD was detached or on another branch, which could lose commits.rm -rof a mounted drive or a folder at its top level (/Volumes,/media, WSL’s/mnt/c) now gets the same safety prompt thatrm -rf /Applicationsgets. - Sandbox: On Linux, sandboxed commands no longer fail to start when a
sandbox.filesystem.denyReadglob contains brackets that are not a character class, such as a[user-id]route folder. - Transcripts:
CLAUDE_CODE_TRANSCRIPT_LOCAL_GCno longer drops messages from the saved transcript when the disk fills up while the file is being trimmed. - Headless runs: A plugin can no longer keep a headless run going past
--max-turns, Stop, or ended input by spawning subagents or re-running a finished one. - Compaction: Stopping a turn while Claude Code is compacting a conversation the API rejected as too long no longer leads to a “Context limit reached” or “Prompt is too long” error.
- Subagents and agent teams: Subagents no longer sometimes forget their most recent work when messaged or resumed right after finishing, and approving a shutdown request from the main session no longer exits the whole CLI.
- LLM gateways: On
context_management: Extra inputs are not permittederrors, Claude Code now resends the request without that field. - Effort:
/effort status,/effort ultracodeand the prompt’s effort indicator no longer show a guessed effort level whenCLAUDE_CODE_EFFORT_LEVELisautoorunsetand no level is sent. - Remote Control: Remote Control no longer permanently withholds a desktop conversation’s history when a different account is signed in to the terminal.
- Claude Desktop: Unsandboxed Bash commands in Code tab sessions on macOS and Linux now see environment variables exported in shell startup files such as ~/.zshrc.
- Performance: Responsiveness and throughput improve when many subagents run at the same time, memory use improves when sending requests in long or resumed conversations, and the safety classifier’s context is no longer stored with every request in auto mode, reducing session file size.
- Cloud sessions: A new conversation’s first turn no longer waits for the local (stdio) MCP servers of plugins synced from claude.ai, unless a server sets
alwaysLoad: true. - Windows: Git command start-up is improved with a standard Git for Windows install, since Claude Code now runs its git.exe directly instead of through its cmd launcher.
- VS Code: One cause of sessions failing to start with “Subprocess initialization did not complete within 60000ms” is fixed: time a SessionStart command hook spends running no longer counts toward the limit, up to 10 minutes in total. Past conversations no longer hides sessions when
claudeCode.claudeProcessWrapperis set. - Code Review: Pull requests opened within a minute or two of an admin turning on Code Review are no longer silently skipped; they are now retried and reviewed.
- Fast mode: The “(research preview)” label was removed from the
/fastdialog title on Claude Opus 5.5.
The release contains 76 changes in total; see the full changelog for every item.
How to Update
- Check your installed version:
claude --version - Update in place:
claude update - If you set
CLAUDE_CODE_AUTO_COMPACT_WINDOWwith a suffix such as200k, review the value:kandMsuffixes are now accepted (200kpreviously set a 100K window silently), and out-of-range or ignored values now produce a warning.