Jamie

How are you keeping Claude Code token spend visible while you build?

by

I like Claude Code a lot, but one thing still feels weirdly opaque to me: token burn while you are deep in a session.

When I am iterating fast, the bill usually shows up after the fact. By then I already made the expensive choices. Long context, repeated retries, and bouncing between models can get surprisingly costly before you really notice it.

I am curious how people here handle this in practice.

Are you just trusting the monthly bill?

Do you set hard limits somewhere?

Do you watch usage in the Anthropic console?

Do you have your own scripts or dashboards for this?

I ended up building a tiny macOS menu bar app for myself called TokenBar that shows token usage live across AI tools, mostly because I wanted cost visibility before the bill arrives, not after. It has been especially useful during long coding sessions where small prompts add up.

Not trying to make this an ad. I am genuinely interested in the workflow side of this because I feel like a lot of people optimize prompts, models, and coding speed, but still fly blind on usage.

What is your setup?

425 views

Add a comment

Replies

Best
Yiğit Şahin
Hey Jamie, it feels good not to be alone in this. I constantly refresh my claude usage ln browser as if it will help me but actually i am just watching how longer do I have before I hit my 100% and it hurts. I tried searching for some token consumption optimization ways such as cave-men approach or Claude.md instructions but nothing significant so far :(
Seb Wilgosz (Engineer of Wealth)

What I did, was using /statusline with a comment.

There is a statusline command, allowing you to setup custom statusline script for claude

I asked claude to setup it in the way that usage is shown.

Now I see current 5h usage percent, and weekly usage live while working. Totally recommend. I also asked it to setup it in the way current branch and PR number if available is set.

Kazuya
​I'm currently setting a $200 budget and just checking my usage occasionally. Whenever I run out of credits, I simply buy more as prompted. ​Ideally, I want to keep costs low, but the value and income generated from the development completely outweigh the AI expenses. So to be honest, I try my best not to be too nervous about the AI costs. The ROI definitely makes it worth it!
Ian G

Buy a plan + extra usage, set limit and don’t worry is my method

Lars Krueger

update: added a screenshot for inspiration. its open source thought.

for my team and me i built a simple toolbar status with claude as well. took a few hours, does its job. osx only as well.
shows percentage and time left for 5 hour, 7 day and icon during peak hours. links status page (not querying though).

additionally, i built a simple proxy logging all requests/responses so we can debug, search, retry using ANTHROPIC_BASE_URL. the proxy url has a user id path parameter and all requests can be filtered by that, the claude token used, session and various usage filters like context size, count of session messages. good to know if subscriptions are needs up/downgrade or team members prompt/context optimisation.

Gerco
Hi @lars_krueger, this is a clever approach and it sounds like solution to me. Do you mind sharing the prompt / build of the “toolbar”? Very interesting! @jamie42 thanks for raising this topic, guess we are all grinding on the same surface.
Lars Krueger

@gerrie has not been a single shot. here is my repo:
https://github.com/joinnow-io/claude-quota

intitial plan prompt: how can i create a osx app that create a icon for the osx bar that constantly shows inidcator for claude-cli weekly and daily quota in percent or total and reset times. should start automatically on boot if wanted. ask questions.

a few ideas i hinted, like reusing api, hinted about getting the claude token via keychain.

Sai Krishna Subramanian

There is indeed a node tool for it - https://github.com/sirmalloc/ccstatusline

It is fully customizable. I have the context window usage, token spend limit. Works very well for me.

Alexander Kesselaar

I wish there was an option to have the usage visible outside of the settings. Can't be that hard. On another note. How cool would it be if we could donate our unused usage to charity.

Vadim Drobinin

Claude Code has a built-in tool for pretty much that, if you run /statusline you can customise what you see when building - from token spend to stale commits or filled context.

Jamie

One thing I noticed after building TokenBar is that the expensive moments are usually not the giant prompts. It is the quiet repetition.

A long Claude Code session with a few retries, a couple of context-heavy detours, and one model switch can burn way more than it feels like in the moment. If I only look later in the Anthropic console, I remember the result, not the decision that caused the spend.

What has helped me most is seeing usage live in the menu bar while I work. Not for finance reporting. Just for behavior. It changes whether I keep retrying, whether I clear context, and whether I hand something off to a cheaper model.

Curious where people here actually draw the line. Do you have a per-session number in your head where you stop and reset, or do you only care at the weekly or monthly level?

Jamie

My setup was basically a stack of bad habits until I got annoyed enough to fix it.

What was going wrong:

- I would stay in a coding flow and only notice spend later in the provider dashboard

- long context threads were quietly doing most of the damage

- retries felt cheap in the moment but expensive in aggregate

What I do now:

- keep live token usage visible while I work instead of checking after the fact

- treat context length like a budget, not a free resource

- break off new sessions sooner when a thread gets bloated

- watch cost per work session, not just monthly total

I built TokenBar for this because I wanted the feedback loop on my Mac menu bar, not buried in a tab somewhere. The useful part is not just seeing a number. It is catching the moment when a session stops being worth what it is costing.

That changed my behavior more than any monthly budget alert ever did.

Curious if other people here manage this at the session level too, or if most people still reconcile it after the bill lands.

12
Next
Last