logo
Published on

Visualizing Claude Code Context Usage with a CLI Tool - "cccontext"

Authors

Now that Claude Code allows parallel development, I’ve been increasingly spinning up multiple sessions to run different development tasks simultaneously.

While I thought, “If this only costs $200, that’s a bargain,” I also figured “They’ll probably introduce limits eventually.”

Sure enough, on August 28, 2025, a Weekly Limit was announced to cap usage per week. It looks like we’ll need to be more mindful of context consumption than ever before.

There have also been scattered reports like “Claude Code got dumber after a certain update.” Claude Code does show remaining context before auto-compact kicks in, but it only appears once you’ve consumed a certain amount.

Given all that, I personally want to constantly monitor context usage in real time while developing.

So, I built a tool called cccontext:

https://www.npmjs.com/package/cccontext

cccontext

How to Use

There are a few CLI options available, but since the main goal is simple, I’ll just explain the basic ones I personally use.

Check the latest session in detail

$ npx cccontext
Check the latest session in detail

This command shows the current context usage, remaining buffer before auto-compact, and other session details for your latest Claude Code session.

If you’re not doing parallel development, or just want to check a single session, this should be enough.

You can also view a specific session using:

$ npx cccontext --list           // List all sessions
$ npx cccontext -session <num>   // View a specific session

(The UI here lacks consistency—something I hope to improve…)

View all sessions at once

View all sessions at once

If you’re doing parallel development like I am, or frequently running /clear as you code, I recommend this command to get a full overview:

npx cccontext sessions --live

Any actions like /clear or /compact will be automatically reflected in real time.

Personally, I use this with iTerm2 + tmux, dedicating one pane to this view so I can always keep an eye on remaining context while giving instructions.

Conclusion

It’s still rough around the edges, but it does the minimum of what I need.

That said, I’d like to improve the UI, add more features, and optimize performance when I get the time.

Note: This article is an English translation of the original Japanese version.