- Symptom
- Every turn errors after a long conversation on a third-party modelContext overflow errors that only clear after /clearAutocompact never triggers early enough
- Cause
- From 2.1.323, a model ID that Claude Code does not recognize is assumed to have a 1M context window instead of 200K. On models with a smaller real window, the session grows past the limit before compaction runs.
- Fix
- Force the 200K assumption with the environment variable, or lower the compaction point with /autocompact, before the session fills.
- Apply
export CLAUDE_CODE_DISABLE_1M_CONTEXT=1- Affected
- Claude Code 2.1.323 and later with unrecognized model IDs, such as other vendors' models behind a gateway
- Sources
Last verified 2026-11-13 · Confirmed by 0 builders