used_percentage uses wrong context window size for 1M context models
Resolved 💬 8 comments Opened Mar 26, 2026 by jackle1127 Closed May 24, 2026
Bug Description
The used_percentage field in the status line JSON is calculated against the wrong context window size for the claude-opus-4-6[1m] model (1M context). It appears to use ~113k (standard Opus context) as the divisor instead of 1,000,000.
Steps to Reproduce
- Use Claude Code with
claude-opus-4-6model and 1M context enabled - Enable a status line that displays
used_percentagefrom the context window stats - Observe that at ~77k tokens, the percentage shows ~68% instead of the expected ~8%
Expected Behavior
77k tokens out of a 1M context window should report ~8% usage.
Actual Behavior
77k tokens reports 68% usage, consistent with dividing by ~113k instead of 1,000,000.
Environment
- Claude Code on Windows 11
- Model:
claude-opus-4-6[1m](Opus 4.6 with 1M context) - Status line reads the pre-calculated
used_percentagefield from the context window JSON
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗