Book a call
LESSON16mVERIFIED 2026-08-04 · CLAUDE CODE 2.1.221 · CODEX CLI 0.146.0 · ANTIGRAVITY CLI 1.1.9 · KIMI CODE CLI 0.31.1

Where the money actually goes

Your bill tracks re-sent context times request count, not how much you type — so the five things that actually top it are not the ones people try to fix.

"I hit the weekly limit on Wednesday and I don't know what did it"

People spend their allowance during the week without knowing what on. Same thing is usually visible on the bill, but as a monthly figure.

The reason it's hard to say is because of a common misconception that doesn't work in one particular scenario: we expect our spend to be proportional to what we type. It's not, it's proportional to what is being re-transmitted and how many times it's being re-transmitted. Let's say you ask "what is the weather today?" — a question that size is a handful of tokens (Anthropic's rough conversion is 0.75 words to the token), but the entire context of the conversation is being sent with every request. On one of our machines this is what the usage panel tells us: "65% of your usage was at >150k context" over the last 24 hours.

So the thing you actually type is negligible compared to what rides along with it.

So the useful part is not what you write but rather what's in every request and how many requests you're making.

Four line items, and only one of them is what you think

Let's have a look at the four building blocks of the bill, priced very differently:

  • Input — everything that gets transmitted; the base rate

  • Cache write — the input being saved so future requests can skip processing it; more expensive than plain input

  • Cache read — the input served from this store; a fraction of the base

  • Output — the model's generated tokens; by a big margin the most expensive per token, the reasonings are being billed in this column

Anthropic publishes multipliers relative to the base input price:

  • 5 minutes cache write: 1.25x

  • 1 hour cache write: 2x

  • Cache read: 0.1x

But not every provider discloses all four columns. For example on OpenAI's Codex credit card there are three columns, no cache write row; Antigravity's CLI shows quota as requests and tokens but not in currency; where they're published it works the same — on the Codex card cached input is exactly 1/10 of the input in every row, output six times the input. Cursor prices all four columns separately per model.

These two things follow, both of them reversing the common assumptions:

  • That big numbers don't mean big bills — look at Anthropic's own worked example, where they split 1.2k of fresh input against 940k of cache read for the same conversation being read back ten times cheaper; a screenshot of a huge token total is mostly that, and gets read as a fortune spent

  • That output is low-volume and expensive, input high-volume and cheap — for instance on Opus 5 it's $5 per million input vs $25 per million output (5x per token), while the volumes differ by two orders of magnitude, in the same worked example above input side tokens are over 180 times more than the output ones. But what column dominates depends on your own output-to-context ratio which is a figure you can't know before but only observe in the usage panel

A turn is not a message

The second multiplier is the number of requests and it's not under your direct control. Every instruction you give the agent is multiple requests:

  • Reading a file — one request

  • Running tests — another, carrying the test output

  • Editing three files and grepping, then re-running — four more

Anthropic says that Claude Code sends the entire conversation with every request, so every tool usage is another request sending the result of it back; so whenever you say "fix this failing test" it's actually as many requests as needed for the loop to run, each carrying everything before it plus whatever the last tool returned.

Therefore the actual unit of account is a turn — everything that happens on the agent's side following one sentence you say.

Contrast this with a prompt that sends the agent looking for something versus one that points to a specific file. Anthropic says that they recommend being as specific as possible, and a good example of what we mean by "vague" is "improve this codebase", it will make the model search a lot.

The shape of a long session

So what long sessions look like when these two things combine: if every request carries the entire context and every turn adds roughly the same number of tokens, request number k costs around k units and the total cost of N-request session is 1+2+…+N, which is N²/2 rather than N. So if you double the session length it's not a twofold but a fourfold input increase. Just a thought experiment, we're not saying this is actually what happens, just saying that this is the right mental model, "session became long" is a different class of problem than "prompt became long".

The cache changes the constant by ten — substantial — but a tenth of N²/2 still grows like N².

For example on Claude Sonnet 5 the list prices through August 31st 2026 are:

  • $2 per million input

  • $0.20 per million cache read

  • $10 per million output

And increase to $3 and $15 the next day. If you had a session with 40 requests of 50k context each:

LineVolumeRateCost
Input, no request hits the cache2,000,000$2 / MTok$4.00
Input, every request hits the cache2,000,000$0.20 / MTok$0.40
Output, 1.5k per request60,000$10 / MTok$0.60

You did the same work, the only difference between the first two lines is the cache warmth, which is the entire reason to keep it warm. The last line is how much the model writes and can't be really guessed from the outside, in this scenario it dominates (1.5k per request) but if it was at Anthropic's worked example ratio (output much lower compared to context) it wouldn't.

So basically there are two equally valid scenarios leading to two different numbers which is why the resolution is the usage panel.

The five things that actually top the bill

Five main reasons behind high spend:

  1. Long context — Anthropic's article about unexpectedly high spend (accounted for the API and cloud-provider plans, not the subscriptions) usually points to sessions being left uncleared or Opus being set as default model; just think that if you were to ask "what's the weather today" during a one-day session it would still include the entire conversation; on our own panel, for the previous 24 hours: "65% of your usage was at >150k context" — the panel itself is careful to say these are independent characteristics rather than a breakdown, which is the right caveat and still points one way

  2. Cache misses — the cache is short-lived, five minutes by default on Anthropic's API, an hour on a subscription; if you return after a break the next message will reprocess the entire context. On a 150k-token session this request is a tenfold increase compared to the read alone, and then there's also the cache write behind it. Nothing changes on your screen. Invalidation is stricter than we think — to be read from it the prompt needs to start with the exact same prefix, and altering any of the tool definitions invalidates the entire thing

  3. Unread tool output — running tests that print thousands of lines, dumping a generated file, fetching an entire documentation page. Anthropic's own article says:

    • 10KB web page ≈ 2,500 tokens

    • 100KB documentation page ≈ 25,000

    • 500KB PDF ≈ 125,000

    Treat these as a lower bound; the same article says that newer models' tokenizer generates around 30% more tokens for the same text. Again, you don't get charged just once, the content is now part of the conversation and goes along with every request. The right thing to do is filtering at the source instead of inside the model — a hook selecting only failure lines will drop a test output from tens of thousands of tokens to hundreds

  4. Thinking — extended reasoning is being billed in the output column, and the default budget can be tens of thousands of tokens per request depending on the model; enabled by default in places like Claude Code because it's really useful on hard problems, but also because it's the simplest thing to reduce if you don't need it for the task

  5. Fan-out — every subagent has its own context window so a fan-out is actually N sessions instead of one. Anthropic says that agent teams consume around 7 times as much as a standard session on tokens when team members work in plan mode, and their usage is proportional to the team size; but on the other hand every subagent is also a saving — the bulky output stays in the sub-context and only a summary gets back to the parent, lowering its per-request cost. So it's like trading a cheaper parent for a higher total, which makes sense if you needed the parallelisation

As a sidenote, the compaction has a cost — /compact reads the conversation it summarises, so compacting a big context is a big request; clearing is free so clearing between unrelated tasks is better than compacting more often.

As another sidenote, sessions in the background are still being transmitted — for example it's summarising for resuming and doing status checks; Anthropic says that they cost typically under four cents per session, so this isn't the problem — but a scheduled task you've set up fires on its interval even while the session is idle, and sends the entire context each time.

Dollars or limits — two different currencies

The last thing is that whether tokens are money or quota depends solely on authentication, and that's where people usually get it wrong:

  • API key — tokens are money, per token, per model, on an invoice

  • Subscription — tokens are quota, a flat fee with an allowance spent against moving windows (five hours and a week for Claude, five hours for Codex, a weekly quota plus a five-hour window for Kimi Code), within the allowance you don't get charged more, you just run out sooner

Even though these sound like different problems — a figure at month end versus hitting a wall in the middle of the week — they're the same behaviour. And every subscription here has some form of paid overflow past the allowance, so you end up back on the first bullet without changing anything about how you work.

But if you use Claude Code it shows a dollar figure calculated locally from token counts based on list prices, and discloses this; don't treat this as an invoice — it doesn't consider promotions or contract discounts and may not reflect what's in the bill. Always treat any in-app price as relative, useful for comparing sessions, never as a bill.

What it actually comes to

Finally, here are Anthropic's published deployment numbers: enterprise average $13 per dev per active day, $150–250 per dev per month, with 90% of users under $30 per active day.

So a big span, same tool, same work, tenfold difference in cost that speaks for looking at your own figures rather than benchmarks. And it's a small figure compared to the salary of a person using the tool anyway, so we want to say it out loud before anyone decides to sacrifice output for token savings.

IN YOUR HARNESS

In Claude Code

On 2.1.221, /cost and /usage print the same screen; the official docs describe it under /usage. Essentially, what's visible is different depending on the authentication method:

When using an API key, the Session block is displayed. It contains the total cost of the run, its duration from API's and actual perspective (wall-clock), number of lines added/removed and the breakdown of used tokens per model:

TEXT
Total cost:            $0.55
Total duration (API):  6m 20s
Total duration (wall): 6h 33m 10s
Total code changes:    0 lines added, 0 lines removed
Usage by model:
   claude-sonnet-4-6:  1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55)

If you're on the Pro/Max/Team/Enterprise plan the dollar figure isn't your bill — it's list-price arithmetic done locally — and the screen leads with plan usage bars instead. Under them there's a breakdown attributing recent usage to skills, subagents, plugins and each MCP server as a percentage of the total; whenever a behaviour takes up 10% or more of the usage it gets flagged. You can switch between 24h and 7-day perspective using "d" and "w" keys respectively:

TEXT
Last 24h · 2411 requests · 224 sessions
  76% of your usage was while 4+ sessions ran in parallel
  72% of your usage came from subagent-heavy sessions
  65% of your usage was at >150k context
  Top subagents: general-purpose 12%, workflow-subagent 5%, Explore 1%
  Top MCP servers: conductor 9%

That's a real panel from a machine we run, and it's worth reading slowly. Three behaviours are flagged — parallel sessions, subagent-heavy sessions, and working above 150k of context — which is three of the five drivers from above, and not one of them is about the prompts being too long.

Two neighbouring things are worth having in the same reflex:

  • /context, which shows what's occupying the window right now

  • --max-budget-usd, which caps the spend on a -p run

A few caveats:

  • Since version 2.1.211 sessions' cost gets set to zero on /clear; for earlier versions of the app it was being summed up during the entire lifetime of the process — so if you were to see this panel looking different on old screenshots, that's why

  • The plan breakdown is computed from the history of sessions run locally on this machine. A second laptop, or anything you did on the web, isn't in it — which is exactly when you need it, because that's when the weekly bar is higher than your own sessions can explain

  • The cost of a session depends on its cache retention time which is one hour for subscription-based users (five minutes for those using an API key or a cloud provider) and five minutes on subscription once you've started drawing on usage credits

In Codex CLI

The two commands relevant here are both in the binary's own command list:

  • /status, which is supposed to show the current session's configuration and token usage (per session)

  • /usage, which is for inspecting the account's usage or resetting its usage limit (per account)

However, it looks like OpenAI's pricing page actually points to using /status for checking the remaining limits, while in the binary, the account-/limit-related things are bound to /usage. Both of these commands are already available in v0.146.0, so as a rule of thumb you can try /status and if the number you're after isn't there, fall back to /usage.

If you want to keep your eye on these numbers at all times without having to query them, you can run /statusline, which configures which of them sit permanently on your screen (in particular, the session's total tokens, input tokens and output tokens, the percentage of the context window used, as well as usage left for both the primary and secondary limits).

In terms of billing, the model is different depending on what you use to authenticate — if it's ChatGPT, you're on a plan with its own rate limits, which are shared between all messages sent from the terminal and in the cloud chats, and get measured in five-hour windows; if it's an API key, you pay per token.

The sharpest breakdown of input vs cached input vs output anywhere in this lesson is OpenAI's published credit rate card, denominated per million tokens:

  • GPT-5.6 Sol: 125 input / 12.5 cached input / 750 output

  • GPT-5.6 Terra: 50 input / 5 cached input / 300 output

  • GPT-5.6 Luna: 5 input / 0.5 cached input / 30 output

You can notice that the cached input is 1/10 of the input in all of these, and the output is 6 times the input in all of these — this is a general pattern. According to OpenAI, an average GPT-5.6 message costs from 5 to 40 credits, which, given that it's for a single model, summarises the entire point of this lesson in a single figure.

A word of caution: you should be aware that not only your local terminal messages are included in the five-hour allowance, but also cloud chats, and code review (it counts when Codex runs it through GitHub). If you feel like this allowance is being used quicker than you type locally, make sure to check other things that might be running. If you want to have a look at the current numbers, there's the usage dashboard under Codex settings in your account, and also a link to it from the binary.

In Cursor

Cursor is the only tool here that doesn't answer this question with a slash command — there are no usage or cost subcommands in the cursor-agent package, and looking for the likely slash-command names (usage, cost, status, tokens, context, compact) within the shipped bundle doesn't return any results. The reporting side lives on the web dashboard; the only thing that got integrated with the CLI is a hardcoded link to it.

What's important to understand about Cursor is its billing model — as it's different compared to other tools featured in this lesson. Unlike the others, Cursor charges per token rather than per request. The pricing table breaks out four categories per model — input, cache write, cache read and output — the same four "buckets" other tools leave implicit and Cursor makes explicit in its pricing list. That's more transparent than in most cases.

The quota is measured in dollars of model usage instead of tokens or messages. That means that for example:

  • Pro user can spend up to $20 a month on using other models

  • Pro Plus — $70

  • Ultra — $400

Choosing a specific third-party model will deduct money from the "Other Models" pool at that model's API rate. So in the end the only thing that's left is a simple math problem — how much money is there and how fast it can be spent? Of all the tools here this is the easiest one to reason about, and for the same reason the easiest to burn through unnoticed.

There are also two multipliers sitting on top if they apply to you — Teams and Enterprise add a Cursor Token Rate of $0.25 per million tokens on top of model API pricing for third-party models, and opting in to regional data residency adds a 10% uplift on model pricing.

The only thing left to do after grasping the billing model is understanding what pool applies to you. To give an example, let's have a look at this command:

BASH
cursor-agent about

It will display version of the tool itself, name of the LLM it uses and the tier of the subscription.

The gotcha

In contrast to the other tools the counter is not visible during sessions in the terminal — you won't see it until you go to the web dashboard in a browser (or maybe even later), so in order to keep an eye on the costs if you're driving Cursor from the CLI we'd advise keeping the dashboard open somewhere you'll see it. Otherwise you find out at the end of the month.

In Antigravity CLI

The Antigravity command for checking usage is /usage (aliased /quota) — it refreshes your model configuration and quota status from the backend and opens an interactive TUI panel, split by models, showing how many requests/tokens are left for each one. Arrow keys and Page Up/Down to move, g and G to jump, Esc or q to close.

The number of requests/tokens is the measurement unit here, not money. Cursor indicates a dollar amount, Antigravity doesn't. Claude Code calculates a price estimate locally, Antigravity doesn't. This panel shows what you haven't spent yet, not what you've already spent; the money part happens on a different surface — AI Credits.

You can type /credits to open the credits panel and see your balance there or even buy more quota in the CLI. The statusline displays it as "AI Credits: 42" and also warns you when you're approaching the limit; you can opt-in to using credits at all by setting a single boolean config parameter to true.

JSON
{ "useG1Credits": true }

If you do, after you spend your plan's quota, Antigravity will use your personal credits instead. That way, if you forget about it, an unattended run might keep going after the included allowance is gone. So if you have agy -p set up on some schedule, make sure you have an opinion about this config parameter yourself.

And finally, just FYI: /usage is only available via the TUI, so it doesn't work with the --print flag. We tried agy -p "/usage" on 1.1.9 and Antigravity treated it as a regular prompt for the model, which then came up with a confident description of the command out of its own head — naming a model version and a /stats alias that appear nowhere in the docs. You get charged for that turn. So if you want to automate anything here, keep your eye on the statusline during an interactive session or check the credits panel after the run. Better to set the ceiling upfront than in the middle of the run.

In Kimi Code CLI

/usage — it shows the token usage, context's consumption, and quota information; the binary itself has a shorter blurb mentioning only the session token usage, but the main thing is that it prints cache reads with a hit rate beside them. The hit rate figure is actually the most crucial one as it tells you what's the percentage of the input for which Kimi did not need to do any heavy lifting.

/status shows the runtime information about the current session (version, model, working directory, permission mode), but no cost-related figures. /compact reclaims context at the cost we mentioned in the main lesson.

There are two separate limits that can be reached:

  • Quota, which renews automatically every 7 days and is bound to the subscription date; if you don't use it all up, you won't have a carry-over.

  • 5-hour window during which Kimi keeps track of your rate. So even if you have some quota left, you can hit this limit and be rate limited.

The quota is shared — Kimi Code utilises the same allowance as Kimi membership; usage from the CLI, VS Code extension, and other third-party tools counts towards it.

Once the quota is exceeded, you can use Kimi with the so-called Extra Usage feature on a pay-as-you-go basis. Generally, the docs describe its prices as close to the official API pricing of Kimi's Open Platform. The docs don't say what's the unit of the quota; they only mention that the cost is connected with the amount of data Kimi reads and generates as well as the complexity of the tasks — so we'd recommend you to rather see it as a meter, not an actual number you can pre-calculate based on your use-case.

Oh, and btw we found that /usage works only in TUI, not in print mode, so if you run kimi -p "/usage" (on 0.31.1) it sends the string to LLM as a regular prompt and it returns a paragraph describing what /usage does, charging you for the turn.

The habits, ranked

At the end of the day it all comes down to four things, not equally valuable:

  1. Clearing between unrelated tasks — the most important one, the only thing that affects N²/2 instead of just the constant, and it's free

  2. Keeping bulk output outside the window — filtering at the source with a hook, a tail or a subagent summarising in a paragraph; reading a file is cheap once but expensive across forty requests

  3. Choosing the right model — adjacent tiers differ by 2–2.5 times on the output column (more if you skip a tier), which is real money on the expensive side

  4. Fan-out with purpose — three agents on a question that wanted one agent is three times the cost of one answer

And then there's the one nothing measures: the heaviest session is the one that went in the wrong direction for an hour and needed to be redone; you don't see it on the bill, only as a high figure on your weekly total. Plan mode, an acceptance criterion and an early interrupt are cost controls even though no usage panel will ever credit them with savings.

Last but not least, reducing tokens and maximising output are two separate goals and it's only the latter that matters; check the usage panel, see which of the five things above applies to you, address it and get back to work.

j / k to move between lessons