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.213 ·

CLAUDE_CODE_NO_MODEL_FALLBACK — Prevent Model Substitution

Entry
JSON All of v2.1.213
EntryKind: in v2.1.213,
New FeaturesSection of the release
What

A new environment variable that locks Claude Code to exactly the configured model and disallows any automatic fallback to a different model — including during compaction.

Usage
export CLAUDE_CODE_NO_MODEL_FALLBACK=true
claude --model claude-opus-4-5 ...
Details
  • When set, the availability fallback chain collapses to [primary] only — no alternate models are tried
  • Compaction is disabled with the message "Compaction unavailable: CLAUDE_CODE_NO_MODEL_FALLBACK is set and model substitution is disabled · unset it to allow the swap"
  • If code attempts a model-fallback pivot while the flag is active, a tripwire throws an error identifying the call site (this is a developer safety net, not a normal user-visible error)
  • The flag is intended for environments where model consistency is a hard requirement (compliance, billing, reproducibility)
Evidence

Tripwire implementation (search for "CLAUDE_CODE_NO_MODEL_FALLBACK tripwire: a model-fallback pivot was attempted", "CLAUDE_CODE_NO_MODEL_FALLBACK")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.213 →

Feedback