Incorrect context usage display in status bar
What version of the VS Code extension are you using?
Version 0.5.17
Which IDE are you using?
Visual Studio Code – Insiders 1.105.0-insider
What platform is your computer?
Microsoft Windows NT 10.0.26120.0 x64
What steps can reproduce the bug?
Open a Codex chat/session (gpt-5-codex).
Paste a long prompt to increase context usage.
Check the status bar/tooltip that shows context counts and percent
What is the expected behavior?
Percentage should be within 0–100% and keep its decimal (e.g., 74.46%, 27.76%)
Numerator/denominator should be formatted consistently:
- either both scaled with k (e.g., 20.3k / 272k tokens)
- both raw with grouping (e.g., 20,293 / 272,000 tokens)
No mixing of thousands grouping with a k suffix
What do you see instead?
Status bar shows inflated percentages like 7461% and 2762% where the real values are ~74.46% and 27.76%
Numerator renders as 20,293k (reads as “20,293 thousands” ≈ 20.293M) though it means ~20.3k
Screenshots:
<img width="836" height="222" alt="Image" src="https://github.com/user-attachments/assets/b7b42edb-2ea1-444f-bdf2-2f5a3b17a703" />
<img width="832" height="223" alt="Image" src="https://github.com/user-attachments/assets/51958666-118a-40dd-81b6-7d25646c715d" />
Additional information
Observed progression (from a single session, same 272k limit):
12k / 272k tokens → 4%
24k / 272k tokens → 9%
209k / 272k tokens → 77%
251k / 272k tokens → 92%
320k / 272k tokens → 118% ← exceeds 100%
344k / 272k tokens → 127% ← exceeds 100%
<img width="828" height="224" alt="Image" src="https://github.com/user-attachments/assets/5f674a54-2bee-4304-ae70-363c5cf87380" />
<img width="836" height="229" alt="Image" src="https://github.com/user-attachments/assets/b42b3883-828b-43b1-b2fa-25f66609ecb0" />
<img width="835" height="294" alt="Image" src="https://github.com/user-attachments/assets/da438afa-fff4-428a-aaee-6c5a7a049eb6" />
<img width="824" height="275" alt="Image" src="https://github.com/user-attachments/assets/4bb23499-4cb8-4936-bef7-cf67b2537dc1" />
<img width="850" height="228" alt="Image" src="https://github.com/user-attachments/assets/b82c0031-79c6-432a-af51-a22c73d676ba" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗