You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
context_window block shows cumulative tokens, not actual context usage #823
The statusline's 🧠 block (context window usage) displays misleading information on long sessions.
Problem
The percentage calculation uses context_window.total_input_tokens which is a cumulative session counter — it never resets, even after Claude Code's "compact" operation.
This means:
On long sessions, the percentage grows unbounded (I've seen 1000%+)
After compact, it still shows high usage even though context was cleared
The displayed number doesn't represent actual context window utilization
Expected behavior
The block should show current context window usage — how much of the model's context limit is currently occupied.
Thank you for the report/suggestion and for the related TypeScript-era work.
I am sorry that the Rust migration made the original TypeScript implementation no longer mergeable as-is. The production CLI has moved from the TypeScript implementation to the Rust implementation under rust/crates/ccusage. The related TypeScript PR has been closed as obsolete, so I am closing this issue as well to keep the tracker focused.
If this behavior is still needed, please open a fresh issue or PR against the current Rust CLI with current-version output and a minimal reproduction or concrete use case.
Activity
ryoppippi commentedon May 19, 2026
Thank you for the report/suggestion and for the related TypeScript-era work.
I am sorry that the Rust migration made the original TypeScript implementation no longer mergeable as-is. The production CLI has moved from the TypeScript implementation to the Rust implementation under
rust/crates/ccusage. The related TypeScript PR has been closed as obsolete, so I am closing this issue as well to keep the tracker focused.If this behavior is still needed, please open a fresh issue or PR against the current Rust CLI with current-version output and a minimal reproduction or concrete use case.
willma-andela commentedon May 20, 2026
Programming language aside, this is still an issue. #666 should be reopened.