context_window_size reported as 200000 for claude-opus-4-8 (1M-context model) → "100% context used" clamps prematurely
Version
Claude Code 2.1.154 (the minimum required for, and current latest npm release for, claude-opus-4-8)
Model
claude-opus-4-8
Summary
For claude-opus-4-8, the statusline JSON reports context_window.context_window_size: 200000 and clamps used_percentage: 100 / remaining_percentage: 0 once usage passes 200k — but the session keeps running fine well past that with no compaction, so the true window is the 1M variant. The built-in "N% context used" indicator therefore pins at "100% context used" while ~64% is actually free.
Statusline JSON snapshot (from a live session)
{
"model": { "id": "claude-opus-4-8", "display_name": "claude-opus-4-8" },
"context_window": {
"total_input_tokens": 360236,
"context_window_size": 200000,
"current_usage": {
"input_tokens": 2,
"cache_creation_input_tokens": 13043,
"cache_read_input_tokens": 347191
},
"used_percentage": 100,
"remaining_percentage": 0
}
}
Note current_usage sums to 360,236 tokens — already 1.8× the reported 200k window — yet the session is alive with no compaction.
Expected
context_window_size should reflect the model's true (1M) window for claude-opus-4-8, so used_percentage / remaining_percentage and the context indicator are accurate.
Related
Same class of bug previously reported for Opus 4.7 [1M]: #49931, #50716.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗