claude-code - 💡(How to fix) Fix [BUG] Context window progress bar fill width doesn't match displayed percentage (under-fills by ~15-20%)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

In the usage / context overlay panel, the Context window progress bar is visually filled significantly less than the percentage shown in the label. The numeric label reads 82%, but the blue filled portion of the bar reaches only ~64% of the track width — an under-fill of roughly 15-20%.

The "Plan usage" bars below it (5-hour limit 17%, Weekly 4%) appear to render at roughly the correct width, so the discrepancy seems specific to the context-window bar.

<img width="412" height="266" alt="Image" src="https://github.com/user-attachments/assets/b2660a5c-c466-4ff6-b6c8-d0a0c5260070" />

Root Cause

In the usage / context overlay panel, the Context window progress bar is visually filled significantly less than the percentage shown in the label. The numeric label reads 82%, but the blue filled portion of the bar reaches only ~64% of the track width — an under-fill of roughly 15-20%.

The "Plan usage" bars below it (5-hour limit 17%, Weekly 4%) appear to render at roughly the correct width, so the discrepancy seems specific to the context-window bar.

<img width="412" height="266" alt="Image" src="https://github.com/user-attachments/assets/b2660a5c-c466-4ff6-b6c8-d0a0c5260070" />
RAW_BUFFERClick to expand / collapse

Description

In the usage / context overlay panel, the Context window progress bar is visually filled significantly less than the percentage shown in the label. The numeric label reads 82%, but the blue filled portion of the bar reaches only ~64% of the track width — an under-fill of roughly 15-20%.

The "Plan usage" bars below it (5-hour limit 17%, Weekly 4%) appear to render at roughly the correct width, so the discrepancy seems specific to the context-window bar.

<img width="412" height="266" alt="Image" src="https://github.com/user-attachments/assets/b2660a5c-c466-4ff6-b6c8-d0a0c5260070" />

Steps to reproduce

  1. Open the usage overlay panel (the floating panel that shows "Context window … (xx%)" and "Plan usage").
  2. Let the context window fill up (here: 164.6k / 200.0k = 82%).
  3. Compare the width of the blue fill against the label percentage.

Expected

The fill width should match the displayed percentage — at 82% the bar should be filled ~82% of the track.

Actual

  • Label: 164.6k / 200.0k (82%)
  • Bar fill measured from the screenshot: ~64% of the track width
  • Mismatch: ~15-18% under-filled

Possible cause: the bar may be scaling against a larger denominator than 200k (e.g. reserving headroom for an auto-compact window) while the label divides by 200k. Or a max-width / inset rounding bug in the fill calculation.

Environment

  • OS: macOS (Darwin 25.3.0)
  • Model shown: Opus 4.8
  • Surface: usage/context overlay panel

A screenshot is available and can be attached to this issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING