ClaudeStatsBar, an open-source status line tool that displays the current session size and the number of tokens to be sent in the next turn during the use of Claude Code, has been released. This tool specifically focuses on visualizing how much of the context window the session occupies and the cost incurred in the next turn.

In tools that utilize APIs like Claude Code, the amount of tokens consumed to resend the entire conversation increases as the session grows longer. According to the developer, because token consumption generally increases at a quadratic rate relative to the session length, there was a challenge where simply knowing the remaining capacity of the context window (as a percentage) did not allow for an accurate understanding of the actual cost increase.

In addition to a progress bar indicating the session's progress, ClaudeStatsBar displays the number of tokens that will be consumed by the next move. This makes it easier to determine the optimal timing for switching tasks (/clear) or compressing the session (/compact). The tool is implemented in Pure Python, requires no dependencies or network communication, and rendering is completed in approximately 25ms.


Source: