The Claude Code Changelog
All Episodes
Claude Code 2.1.302: Pin Auto-Mode Models and Fix CI Defaults

Claude Code 2.1.302: Pin Auto-Mode Models and Fix CI Defaults

0:00|0:00

Claude Code 2.1.302 adds CLAUDE_CODE_AUTO_MODE_MODEL, letting users on proxy, Bedrock, or Vertex setups choose the model used by the client-side auto-mode classifier. The episode also covers a breaking default for headless sessions—explicitly set --permission-mode auto in CI—as well as server-side auto-mode compaction and smaller updates to subagents, idle compaction, hooks, image handling, and plugin startup.


Chapter 1

Pinning the Auto Mode Classifier in 2.1.302

Lachlan Reed

Righto, grab a coffee, this one's brought to you by Jellypod AI. I'm Lachlan, that's James, and today it's Claude Code 2.1.302, released October 16, 2026. One new environment variable in there closes a loop we opened last time.

James Turner

Right. Last episode we covered why proxies and Bedrock or Vertex setups lose the free server side safety check in auto mode and fall back to a classifier running on your own client. We left that as a trap. 2.1.302 gives you a lever. It's called CLAUDE_CODE_AUTO_MODE_MODEL, and it chooses the model the client side auto mode classifier uses.

Lachlan Reed

And the release notes are careful about scope. It does not change the model for server side auto mode. So if you're on the Anthropic API and the server side check is running, this variable does nothing for you.

James Turner

Why does it matter? In auto mode, Claude Code checks tool calls before running them. When that check happens on your client, it's a model call, and that call takes time and spends tokens. Until now you couldn't pick which model made it. My read, and this is interpretation, not something the changelog states, is that a small fast model is the sensible fit for a yes or no safety check. That could cut latency on turns with lots of tool calls.

Lachlan Reed

Setting it is dead simple. In your shell profile, or CI config, you export CLAUDE_CODE_AUTO_MODE_MODEL equals the model ID you want. Pick a Haiku class model if you want cheap and quick. On Bedrock or Vertex, use the identifier your provider uses for that model, whether that's an inference profile or a model ID. Don't paste the Anthropic API name and hope for the best.

James Turner

One caveat there. The notes don't say what happens with a bad or retired model ID. So test it. Set the variable, run something that triggers a checked tool call, and confirm it behaves before you roll it out to a team.

Lachlan Reed

Now, the one that could actually bite you. Also in this release, claude in print mode, the p flag, and Agent SDK sessions with no permission mode set now start in default mode. That applies on third party providers, with telemetry off, or on a fresh install. Default mode means it asks for permission.

James Turner

Which in a headless pipeline means nobody's there to answer. So if your CI job quietly relied on auto, it can stall or fail after you upgrade. The fix is to say what you want. Pass the permission mode flag with the value auto, and auto stays auto. Something like claude, the p flag, the permission mode flag set to auto, then your prompt, say, run the build and the tests.

Lachlan Reed

So the combo for Bedrock CI is: set the permission mode explicitly, and set CLAUDE_CODE_AUTO_MODE_MODEL so the fallback classifier isn't running on whatever it picked by default.

James Turner

There's one more auto mode fix, and it's for the server side path. Before, if a conversation got too long for the safety check, every checked tool call was denied. Now Claude Code compacts the conversation instead. So long sessions shouldn't hit that wall.

Lachlan Reed

A few smaller bits worth knowing. Fork subagents, that's subagent_type fork, are now on by default in print mode, the Agent SDK, the desktop app and VS Code, same as the terminal already had. If you don't want them, set CLAUDE_CODE_FORK_SUBAGENT to 0. And claude mcp serve never offers them.

James Turner

Also in the desktop app and VS Code, the main conversation's subagents now always run in the background, like the terminal. A subagent's own Agent calls run in the foreground by default.

Lachlan Reed

There's a new Idle compaction row in /config, so you can turn idle compaction off or back on without digging through files, and the notices after an idle compaction now tell you how to switch it off. Prompt and agent hooks are capped at twelve running at once per event, the rest queue. If you've got a pile of hooks on one event, expect that queueing.

James Turner

And the Read tool now refuses image sources over 128 MB instead of loading them whole into memory. Plus plugin startup is faster with lots of plugins, especially on Windows.

Lachlan Reed

So the takeaway: after you upgrade to 2.1.302, check your headless jobs, set the permission mode explicitly, and if you're on a proxy or a cloud provider, pin that classifier model. Catch you next time.