Field Logic has developed ClaudeStatsBar, a status line tool designed to provide Claude Code users with detailed insights into their session size and token consumption. Unlike standard context window indicators, ClaudeStatsBar reveals the cost of the next interaction before the user types, enabling better management of long sessions.
Claude Code sessions can grow substantially as each turn resends the entire conversation history, causing token usage to increase roughly with the square of the session length. This can lead to unexpectedly high costs and mid-task context exhaustion, especially with stronger models and large codebases.
ClaudeStatsBar displays key metrics such as the current session size, the token cost of the upcoming turn, and the remaining quota within the 5-hour and 7-day usage windows. This visibility allows users to decide when to clear or compact the session proactively, avoiding disruptions during critical tasks.
The tool is implemented in pure Python with no external dependencies, ensuring minimal overhead and fast rendering times. It integrates with Claude Code by modifying the user’s settings.json to add a status line command, which updates dynamically as the session progresses.
Analysis from Field Logic’s own usage data—covering over 900 transcripts and 11.6 billion tokens—shows that session size, rather than prompt length, is the main driver of token consumption. The tool highlights that even simple replies late in a session can incur high token costs due to the large context being resent.
By providing real-time feedback on token costs and session growth, ClaudeStatsBar helps users optimize their workflow, reduce unnecessary token usage, and maintain smoother interactions with Claude Code. The project is open source under the MIT license and welcomes feedback from the community.