Claude Code 2.1.302: choose the auto mode classifier model, switch off idle compaction, and check your claude -p scripts
Claude Code 2.1.302 adds CLAUDE_CODE_AUTO_MODE_MODEL, an Idle compaction toggle in /config, and a notice that standalone Claude Design closes by December 14, 2026. It also turns fork subagents on by default in claude -p and the Agent SDK, and changes the starting permission mode on third-party providers. Here is what changed and what to check before you upgrade.
Claude Code 2.1.302 was published to npm on October 16, 2026 (UTC), and it is the current latest tag on the @anthropic-ai/claude-code package. The stable tag still points at 2.1.292, so whether you get this release depends on which channel you install from. The changelog is long, but a few entries change how sessions behave, especially headless ones. The question for builders: what in 2.1.302 could change my setup, and what should I check first?
Pick the model behind client-side auto mode
The new CLAUDE_CODE_AUTO_MODE_MODEL environment variable chooses the model that the client-side auto mode classifier uses. The changelog is explicit that it does not change the model for server-side auto mode.
That distinction matters, because many sessions no longer run the classifier on the client. Per the permission modes docs, Claude Code asks the server to review auto mode actions on a direct Anthropic API connection, on cloud providers such as Bedrock and Foundry, and when ANTHROPIC_BASE_URL points at an LLM gateway, depending on version. The environment variable reference says setting CLAUDE_CODE_AUTO_MODE_SERVER=0 makes Claude Code use its own classifier requests instead. If you want to set the classifier model yourself, check which of the two paths your sessions are on.
The server-side path also got a fix: a conversation too long for the safety check is now compacted, instead of every checked tool call being denied.
Turn idle compaction off from /config
/config now has an Idle compaction row, and the notice shown after an idle compaction says how to turn it off. Per the settings reference, idle compaction summarizes a long conversation you have stepped away from, shortly before its prompt cache expires. It applies in interactive terminal sessions on the one-hour cache TTL once context reaches 200,000 tokens and about 54 minutes have passed since the last request. The same switch is "idleCompaction": false in settings.json (v2.1.290 or later), and CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes the threshold, with a floor of 100,000. If you are tuning context costs, our guide to cutting Claude Code token overhead covers the other levers.
Behavior changes for headless and IDE sessions
These are the entries most likely to surprise a script or CI job:
- Starting permission mode.
claude -pand Agent SDK sessions with no permission mode set now start indefaultmode on third-party providers when telemetry is off or on a fresh install. Passing--permission-mode autokeeps auto. If you rely on auto mode in pipelines, set it explicitly. Background: our note on auto mode becoming the default. - Fork subagents on by default in
claude -p, the Agent SDK, the desktop app and VS Code, matching the terminal.CLAUDE_CODE_FORK_SUBAGENT=0turns them off, andclaude mcp servenever offers them. - Background subagents. The desktop app and VS Code now always run the main conversation’s subagents in the background.
- Hook concurrency. At most 12 prompt or agent hooks of one event run at a time; the rest wait.
Fixes worth knowing
- MCP servers that negotiate protocol version
2026-07-28but omitresultType,ttlMsorcacheScopeno longer show no tools or fail every call. - Switching to Vertex or Bedrock mid-session no longer fails with “diagnostics: Extra inputs are not permitted”.
- Stopping a turn during compaction no longer triggers “Prompt is too long”.
- The Read tool now refuses image sources over 128 MB instead of loading them into memory.
- Worktree isolation works again under git 2.56 or later when a stray
.gitfile points at a missing directory.
Claude Design notice
/design-sync and /design-login now show a notice that standalone Claude Design (claude.ai/design) closes by December 14, 2026. If you use those commands, plan around that date.
Bottom line
To try it, run npm install -g @anthropic-ai/claude-code@2.1.302 and confirm with claude --version. Before rolling it into CI, set --permission-mode explicitly, decide whether you want fork subagents in headless runs, and check whether your auto mode classifier runs on the client or the server. For how agent-written changes get reviewed once they land, see how the Claude Code team does code review.
Source: Claude Code CHANGELOG — 2.1.302