[Bug] Statusline context percentage misaligned with actual context usage calculation
Resolved 💬 2 comments Opened Feb 5, 2026 by quessaer Closed Apr 7, 2026
Bug Description
Statusline context percentage doesn't match actual context usage.
Environment:
- Claude Code 2.1.31
- Windows 11 + WezTerm
- Model: Opus 4.5
Issue:
- Statusline showed: 84%
- But "Context left until auto-compact" showed: 0%
- Token count: 167483 tokens
Expected: If context is nearly full (0% left), statusline should show ~100%, not 84%.
The statusline percentage appears to lag behind or calculate differently than the actual context window state. This makes it unreliable for monitoring when auto-compact will trigger.
Environment Info
- Platform: win32
- Terminal: WezTerm
- Version: 2.1.31
- Feedback ID: c49399b7-fe0d-43a1-bde3-ebbdb64f85aa
Errors
[{"error":"AbortError: The operation was aborted.\n at unknown\n at abortChildProcess (node:child_process:947:42)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (B:/~BUN/root/claude.exe:3096:209)","timestamp":"2026-02-04T03:54:14.439Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/claude.exe:379:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:56:33.388Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/claude.exe:379:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T07:33:40.441Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/claude.exe:379:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T08:13:54.371Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/claude.exe:379:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T08:29:47.201Z"},{"error":"Error\n at uh (B:/~BUN/root/claude.exe:42:1144)\n at <anonymous> (B:/~BUN/root/claude.exe:47:10089)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:861:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/claude.exe:49:2149)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:07:12.938Z"},{"error":"Error\n at uh (B:/~BUN/root/claude.exe:42:1144)\n at <anonymous> (B:/~BUN/root/claude.exe:47:10089)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:861:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/claude.exe:49:2149)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:07:40.996Z"},{"error":"Error\n at uh (B:/~BUN/root/claude.exe:42:1144)\n at <anonymous> (B:/~BUN/root/claude.exe:47:10089)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:861:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/claude.exe:49:2149)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:07:57.960Z"},{"error":"Error\n at uh (B:/~BUN/root/claude.exe:42:1144)\n at <anonymous> (B:/~BUN/root/claude.exe:47:10089)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:861:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/claude.exe:49:2149)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:15:02.240Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/claude.exe:379:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:36:33.569Z"},{"error":"Error: Request was aborted.\n at NG$ (B:/~BUN/root/claude.exe:1569:23586)\n at XnI (B:/~BUN/root/claude.exe:5737:1933)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:38:30.134Z"},{"error":"Error: Compaction interrupted · This may be due to network issues — please try again.\n at B0E (B:/~BUN/root/claude.exe:2929:5398)\n at async y6H (unknown)\n at async KYI (unknown)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:38:30.137Z"},{"error":"Error: Request was aborted.\n at NG$ (B:/~BUN/root/claude.exe:1569:23586)\n at XnI (B:/~BUN/root/claude.exe:5737:1933)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T01:38:30.192Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗