Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.299 ·

Unknown-model warning becomes a visible banner, with a CLAUDE_CODE_MAX_CONTEXT_TOKENS exemption

An unrecognized model now gets a visible warning banner, and setting CLAUDE_CODE_MAX_CONTEXT_TOKENS can exempt first-party models from the check

Group of 2 Use it now Improvements
JSON All of v2.1.299
Use it nowTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
ImprovementsKind: in v2.1.299,
What probably matters to youSection of the release

Unclear Whether setting CLAUDE_CODE_MAX_CONTEXT_TOKENS now removes the unknown-model warning for first-party models is not settled.

What

The context window is how much conversation a model can hold at once. When Claude Code does not recognize a model, it assumes a window size and compacts (summarizes older conversation) to stay within it.

  • The warning is no longer one plain string. It now carries the model, the assumed window, a short text and a detail.
  • A new 'model-unrecognized' warning shows: 'Model ... isn't recognized · context assumed to be N tokens · update Claude Code, or see the docs'. The app keeps it in a new unknownModelWindowWarning field next to the model deprecation warning.
  • Auto-compact still keeps the session within the assumed window, and CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1 still restores the previous behaviour.
  • The check was moved into a separate helper. A new function exempts first-party models from it when CLAUDE_CODE_MAX_CONTEXT_TOKENS is set to a positive value and the model qualifies for it.

Why

People on a model Claude Code does not recognize, such as a gateway alias, now see a visible warning. Setting CLAUDE_CODE_MAX_CONTEXT_TOKENS may also change whether that warning applies.

Read from
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up CLAUDE_CODE_MAX_CONTEXT_TOKENS, on Model configuration. * **Any other window**: set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](/docs/en/env-vars) to the window size in tokens in the environment that starts Claude Code, such as `CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000`. For an unrecognized ID that doesn't… model-config see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether setting CLAUDE_CODE_MAX_CONTEXT_TOKENS now removes the unknown-model warning for first-party models is not settled.
Anthropic's documentation agreesAnthropic's documentation has since written up CLAUDE_CODE_MAX_CONTEXT_TOKENS, on Model configuration.

See this entry in the whole of v2.1.299 →

Feedback