Anthropic Breaking change major

Claude Code assumes a 1M context window for model IDs it does not recognize

Claude Code 2.1.323 assumes a 1M-token context window, not 200K, for unrecognized model IDs. Sessions on smaller-window models behind gateways can fail every turn once full unless CLAUDE_CODE_DISABLE_1M_CONTEXT=1 is set.

What does this mean for me?

Action needed
  • Engineering leadership

    Cost, risk, timeline, team impact Plan for it

    Teams running Claude Code through an LLM gateway or on non-Anthropic models can see sessions fail every turn once they fill. Have whoever owns the gateway set a context limit in your managed settings before rolling 2.1.323 out widely.

  • Engineer

    What to change, what breaks, what to test Action needed

    If you run Claude Code on a model ID it doesn't recognize with a window under 1M, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`, or for `claude-` prefixed gateway IDs set `CLAUDE_CODE_MAX_CONTEXT_TOKENS`. Update to 2.1.325, which compacts instead of failing on many gateways.

  • General consumer

    Using the Claude apps, not the API No impact

    Nothing to do. This is a Claude Code setting for developers using custom model gateways and does not change the Claude apps.

Claude Code 2.1.323 changes the context window it assumes for a model ID it does not recognize from 200K to 1M tokens. This affects sessions pointed at gateways, custom model names or other vendors’ models.

The changelog warns that sessions on models with a smaller real window can fail every turn once the conversation passes that window, until /clear. To avoid it, set CLAUDE_CODE_DISABLE_1M_CONTEXT=1 before such a session fills, or use /autocompact to compact earlier.

2.1.325 follows up: CLAUDE_CODE_MAX_CONTEXT_TOKENS now also sets the window for unrecognized model IDs that start with claude-, such as a gateway’s claude-sonnet-latest, and sessions on many third-party gateways and Foundry that stopped with a context length error on every turn now compact instead.

The changelog carries no dates; the date is the 2.1.323 publish date, November 12, 2026.

Topics: Coding tools

Terms on this page: Context window

Sources

Confidence
high
Verification
Verified: stated on the vendor's own pages
Date precision
exact
How this entry was made
Drafted by an agent, reviewed by a person