DEV Community

John
John

Posted on

How to Track Claude Code Token Usage Before It Surprises You

Claude Code and Codex are getting good enough that the real problem is no longer whether the agent can do the work.

The problem is knowing what it is burning while it works.

Most developers only check usage after the session is already expensive. That is backwards. If an agent is running for an hour, switching models, hitting reset windows, or quietly chewing through context, the useful number is the one you can see while you are still working.

The visibility gap

Built-in usage commands are useful, but they are usually reactive. You run a command, check a dashboard, or dig through logs after the fact.

That is fine for audits. It is not great for live work.

When I am using AI coding tools, the questions I want answered immediately are:

  • how fast am I burning tokens?
  • which model is doing most of the work?
  • am I close to a reset or limit?
  • is this session becoming expensive enough to stop and rethink?
  • is my Mac also getting cooked by the workflow?

Those are tiny signals, but they change behavior.

Why a menu bar view works

A menu bar token tracker is boring in the best way. You do not need a new dashboard. You just need the number to stay visible.

If usage is always one glance away, you catch runaway agent loops earlier. You notice when a simple task turned into a huge context burn. You stop treating token usage like a mystery bill.

That is why I built TokenBar for macOS.

It keeps AI usage, credits, reset windows, top model/activity, and Mac load visible from the menu bar while you work.

Who it is for

TokenBar is most useful if you:

  • use Claude Code, Codex, Cursor, or agent-heavy workflows
  • run long coding sessions
  • care about token spend before the invoice arrives
  • want live visibility instead of another analytics tab

It is a small Mac utility, not an enterprise observability platform. That is the point.

If you want to try it, it is here: https://tokenbar.site

The bigger lesson: AI coding tools are becoming powerful enough that usage visibility should be ambient, not something you remember to check later.

Top comments (0)