claude-code - 💡(How to fix) Fix [Bug] Context usage discrepancy between CLI and web/desktop UI causing incorrect billing

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…

Error Message

[{"error":"Error: 401 The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch()\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63853)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T11:24:26.764Z"}]

Root Cause

Why the difference? why is my context usgae not showing in the web interface? Because of this error claude has burned through $40 worht of credit.

Code Example

[{"error":"Error: 401 The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63853)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T11:24:26.764Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description In Claude CLI it says Context 100% and is using my funds form my account.. But in the web UI and desktop app:

Current session 0% All models 55%

Why the difference? why is my context usgae not showing in the web interface? Because of this error claude has burned through $40 worht of credit.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.156
  • Feedback ID: 250bff45-0e6f-4db8-b59c-336ff056ad5d

Errors

[{"error":"Error: 401 The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63853)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T11:24:26.764Z"}]
<img width="1415" height="136" alt="Image" src="https://github.com/user-attachments/assets/f9219b51-3f67-46a3-b065-966ea25edb2c" /> <img width="1415" height="136" alt="Image" src="https://github.com/user-attachments/assets/493da3a0-fa0b-4d44-812c-1d757df70c9e" /> <img width="1415" height="351" alt="Image" src="https://github.com/user-attachments/assets/f8ac5993-fb60-4acf-b272-0155c3a51c4c" /> <img width="1166" height="406" alt="Image" src="https://github.com/user-attachments/assets/f9de077f-b5e5-4fcc-9184-5e50da0223a2" />

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

claude-code - 💡(How to fix) Fix [Bug] Context usage discrepancy between CLI and web/desktop UI causing incorrect billing