Claude Code 2.1.325 applies context window setting to unrecognised claude- model IDs
CLAUDE_CODE_MAX_CONTEXT_TOKENS now also sets the context window for unrecognised model IDs that start with claude-, such as a gateway's claude-sonnet-latest.
Claude Code 2.1.325, dated November 13, 2026, extends the CLAUDE_CODE_MAX_CONTEXT_TOKENS environment variable. It now also sets the context window for model IDs that Claude Code does not recognise but that begin with claude-. The changelog's example is a gateway's claude-sonnet-latest. The change applies to sessions where Claude Code doesn't recognise the model ID. The entry files it as a change to the variable's reach rather than a new setting.
The changelog doesn't say what context window Claude Code used for unrecognised IDs before this release. It also doesn't say what happened in those sessions when the number was wrong. The same release fixed sessions on many third-party gateways and Foundry that stopped with a context length error on every turn instead of compacting. The entry doesn't say whether that fix and this change share a cause. It also doesn't give a range or format for the variable's value.
What changed
CLAUDE_CODE_MAX_CONTEXT_TOKENS now also sets the context window for unrecognised model IDs that start with claude-, such as a gateway's claude-sonnet-latest.
Type: New capability · Takes effect: Friday, November 13, 2026 · Applies to: Claude Code 2.1.325, CLAUDE_CODE_MAX_CONTEXT_TOKENS
Why it matters
Teams routing Claude through gateways with custom model names can control context size without relying on the default assumption for unknown IDs.
What you can do
If your gateway uses custom claude- model names, set CLAUDE_CODE_MAX_CONTEXT_TOKENS to the window you need.
Original source
Where we saw it
Claude Code changelog
AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it. How it works