[BUG] /context uses 200k window for claude-fable-5, which has a 1M context window
Status Fixed / completed
Reported on v2.1.207
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Jul 13, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Claude Code version: 2.1.207
- Platform: macOS (darwin 25.5.0)
- Model:
claude-fable-5(Fable 5)
Description
/context (and the autocompact logic) assumes a 200k token context window when the session runs on claude-fable-5, but Fable 5 has a 1M context window (1M is also the default; 128K max output).
As a result, /context reports usage over 100% and warns that autocompact is imminent, while actual usage is far below the real limit.
Steps to reproduce
- Start a session with model
claude-fable-5. - Accumulate ~220k tokens of conversation.
- Run
/context.
Actual behavior
Context Usage
220.7k/200k tokens (110%)
⚠ Context is 110% full
Autocompact will trigger soon, which discards older messages.
Expected behavior
The denominator should be the model's real context window (1M for claude-fable-5), i.e. ~22% usage in the example above, and autocompact thresholds should be computed against it.
The Models API exposes the correct value:GET /v1/models/claude-fable-5 → max_input_tokens: 1000000
so the limit could be resolved per-model at runtime instead of a hardcoded 200k.
Notes
- Token counting appears correct; only the window size / percentage / autocompact threshold are wrong.
- Possibly affects other 1M-context models if the limit is hardcoded per tier rather than per model.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Likely the same user-visible defect with a diagnosed root cause on partner providers, filed as #81068: on Bedrock/Vertex/Foundry the 200K comes from the catalog's missing
native_1m_3pattestation on the Fable 5 / Opus 4.7+ entries (not a generic hardcode), and Bedrock was verified serving 271K bare/no-beta. Includes the resolver analysis and a fix ask.Tested this on a fresh install of 2.1.233 (Linux): ran
claude --model claude-fable-5, then/context.Result:
31.6k/1m tokens (3%)withFree space: 968.4k (96.8%)— the denominator is the full 1M window, and autocompact thresholds are computed against it./statusconfirms the model isclaude-fable-5. Fable 5's 1M window is the default; no[1m]suffix or setting is needed.The symptom you saw on 2.1.207 (
220.7k/200k tokens (110%), "Autocompact will trigger soon") matches a bug fixed in 2.1.208: "Fixed the context window (and auto-compact indicator) briefly resetting to 200k after the CLI auto-updates, causing a false '100% context used' when resuming long-context sessions" — see the changelog.One caveat: if
CLAUDE_CODE_DISABLE_1M_CONTEXTis set in your environment, sessions are intentionally held to 200K via auto-compaction.Closing as fixed in 2.1.208 — if you still see a 200k denominator on 2.1.208 or later (without that env var), reply here and we'll reopen.
🤖 Generated with Claude Code
@bcherny note that https://github.com/anthropics/claude-code/issues/81068 shows the same 200k context symptom and is replicable on v2.1.219.
I confirmed just now it was also replicable on 2.1.233.
See https://github.com/anthropics/claude-code/issues/81068 for steps to reproduce.
As described, this is likely leading to significant underperformance on Fable and Opus for those using Bedrock.
Context Usage
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ Fable 5
⛁ ⛁ ⛁ ⛁ ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ global.anthropic.claude-fable-5
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 25.2k/200k tokens (13%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ Estimated usage by category
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ System prompt: 3.5k tokens (1.8%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ System tools: 13.1k tokens (6.6%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Custom agents: 83 tokens (0.0%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Memory files: 6.4k tokens (3.2%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Skills: 2k tokens (1.0%)
⛁ Messages: 7 tokens (0.0%)
⛶ Free space: 174.8k (87.4%)