Cost and rate
While a flow runs, Humanize counts what it has spent, in tokens and in dollars, and how fast it is spending. Use this page to read those figures: to see what a run is costing before it ends, to compare two agents or two efforts, and to know when a figure is short of the whole truth.
Try it
Run any flow for one turn:
hmz exec -f chat -a assistant=claude/claude-haiku-4-5-20251001:low \
"Name the three primary colours, one line."The turn ends with a line of what it cost:
✻ input 10 · output 136 · cache_read 13.9k · cache_write 6.9k · $0.01 · claude-haiku-4-5-20251001 · assistantBefore you start
- Humanize is installed and a coding agent CLI is signed in.
- For money as well as tokens, open
hmzonce on this machine: the interface is what fetches the price list. Until it has, every figure is tokens only.
What is counted
Every turn an agent takes spends tokens of up to five kinds, and each kind has its own price, so Humanize keeps them apart rather than adding them into one total:
| Kind | Is |
|---|---|
input | what the agent was sent, fresh |
output | what the model wrote, reasoning included unless the CLI counts it apart |
cache_read | input the provider had cached from an earlier request, usually the bulk of a long turn and the cheapest |
cache_write | input written into that cache, priced a little above input |
reasoning | thinking, where a CLI counts it apart from the output. Priced as output |
The money is those tokens at list price, in US dollars, from a public price list. The rate is output tokens a second over the last five minutes. You see all three in two places: a line per turn under hmz exec, and a running readout above the prompt in hmz.
Example: read a turn's line under hmz exec
✻ input 10 · output 136 · cache_read 13.9k · cache_write 6.9k · $0.01 · claude-haiku-4-5-20251001 · assistant
① ② ③ ④ ⑤ ⑥ ⑦What each part means
input 10: fresh input for this turn. Small, because almost all of what an agent is sent is its system prompt and history, which the provider caches.output 136: what the model wrote. This is the figure a harder effort makes grow, and the one-p budget.output_tokens=caps.cache_read 13.9k: cached input read back. Large but cheap: at Claude Haiku's list price it is a tenth ofinput.cache_write 6.9k: input the provider cached this turn, to read back on the next one.$0.01: what the turn's tokens come to at list price. Under a cent it shows four places, as in$0.0062, so a turn that cost something never reads$0.00.- The model that took the turn, as the CLI named it.
- The role it filled. In a flow with several agents, this is how you tell their lines apart.
A flow with two roles prints one such line per turn, per role. This is a real rlar run of two turns each, with the reviewer checking the actor's fix:
✻ input 26 · output 376 · cache_read 55.6k · cache_write 7.3k · $0.02 · claude-haiku-4-5-20251001 · actor
✻ input 100 · output 2.7k · cache_read 248.4k · cache_write 25.1k · $0.07 · claude-haiku-4-5-20251001 · reviewer
✻ input 10 · output 298 · cache_read 21.2k · cache_write 327 · $0.0040 · claude-haiku-4-5-20251001 · actor
✻ input 114 · output 2.6k · cache_read 322.6k · cache_write 6.1k · $0.05 · claude-haiku-4-5-20251001 · reviewerThe reviewer read several times what the actor did, and cost several times as much: it is the role to give a cheaper model or a lower effort, not the actor.
Example: watch the readout in hmz
In the interface, once anything has been spent, the readout sits under the agent lines, above the editor. This one is a single chat agent a minute in:
assistant · claude/claude-haiku-4-5-20251001:low · ● 1 ①
human · outworlder · asking
input 20 · output 532 · cache_read 27.7k · cache_write 13.8k ②
$0.02 · 15 out/s ③What each part means
- The agent lines: each role, what fills it, and its sessions. The readout below them is for the whole run, every agent together.
- The token kinds, summed over the run so far. A
+after a figure means at least this much: see The+, and a missing$. $0.02is the run so far at list price.15 out/sis output tokens a second over the last five minutes, so it falls while the agent waits on you or on a slow tool.
Press ← for the monitor, which splits the same figures by model.
Check that it worked
- Under
hmz exec, every finished turn has a✻line. With--json, the turn'sresultobject carries the same figures astokens(by model) andspent(by kind):"spent":{"cache_write":3426.0,"output":400.0,"cache_read":38448.0,"input":18.0}. - In
hmz, the readout appears as soon as the first tokens are reported, and the$once the price list has been fetched. $TMPDIR/humanize-<uid>/prices.jsonexists once the list has been fetched.
The +, and a missing $
Switch agents in and out of the run to see how the readout marks what it cannot count:
builder · claude/claude-opus-5:high
reviewer · codex/gpt-5.6-sol:high
input 12.4k·output 2.2k·cache_read 1.02M·cache_write 38.9k+
$1.34 · 91 out/s
- cache_write+ — Codex does not report cache writes, so this is a floor.
A simulation with made-up figures. Which columns appear, which wear a +, and whether there is money at all follow the rules the readout uses.
- A
+after a kind means some agent's CLI does not report that kind, so the figure holds only the others'. With one agent there is nothing to be short of, and nothing is marked. - A
+after the money means some model has no price, so its tokens add nothing to it. - No
$at all means no model of the run has a price.
A + also appears on every kind when a CLI reports some tokens without saying which kind they were.
The money
The prices come from OpenLLMPrices and are kept on this machine, in $TMPDIR/humanize-<uid>/prices.json. hmz refreshes the list in the background about once a day, and nothing you type waits for it. hmz exec reads what is kept and never fetches.
A model the list does not have shows its tokens and no money: a blank, never $0.00. Behind a gateway, most models are like that.
Read the figure as what the work is worth at list price, not as your bill:
| List price | not what a subscription or a negotiated rate charges |
| Standard tier | a very long turn priced higher past some context length cost more than this says |
| A floor | a kind of token the list has no price for adds nothing |
Variations
Use another price list
HUMANIZE_PRICES changes where the list comes from. A list of your own must be in OpenLLMPrices' format:
HUMANIZE_PRICES=off hmz # never fetch
HUMANIZE_PRICES=https://example.com/prices.json hmz # fetch from here instead
HUMANIZE_PRICES=/srv/prices.json hmz # or read a fileCap the spending rather than watch it
The same figures are what a budget stops on. -p budget.cost=5 stops the run at five dollars, -p budget.output_tokens=200k at that many written tokens. See Every run has a budget.
When it moves
The readout is worked out again every five seconds, and whenever an agent does anything. How often new tokens reach it depends on the CLI:
| Backend | Tokens arrive |
|---|---|
claude, codex, dsh, kimi, mcode | during the turn as each request to the model comes back |
agy, cursor-agent, grok, mimo, omp, opencode, pi, qwen, added CLIs | when the turn ends all at once |
What an agent of Claude Code's own (its Agent tool) spends is the exception: Claude says it only when the turn ends, so it arrives then, and a budget that is not graceful cannot stop a turn while one of those is working.
The rate counts seconds on the clock, so the time a flow spends between turns counts too: a run that has stopped working reads as slowing down.
Which kinds each backend reports
| Backend | Kinds |
|---|---|
claude, cursor-agent, dsh, grok, kimi, mcode, omp, pi, qwen | input, output, cache_read, cache_write |
mimo, opencode | those four, and reasoning |
agy | input, output, cache_read, reasoning |
codex | input, output, cache_read |
reasoning is listed only where a CLI counts it apart from the output. Everywhere else it is inside output, and priced as output.
Pitfalls
- No
$underhmz exec. The price list has never been fetched on this machine. Openhmzonce and leave it a few seconds, or pointHUMANIZE_PRICESat a copy. nobody lists a price for <model>, so cost=… cannot stop what it spends. Acostcap cannot stop a model that has no price. Adddurationoroutput_tokensto the budget.the price list … which is not a number, and no run starts. The list gives a price that is not a number. See Troubleshooting. A figure that cannot be counted shows as$?.- The count sits still, then jumps. That CLI reports when the turn ends. See the table above, and Troubleshooting.
- The rate falls to nothing. The flow is waiting, on you or between turns. It is a rate over the clock, not over work.
Next steps
- Watching a run: the same figures by model, beside the handover graph
- Every run has a budget: the same spending, as a cap on the whole run
- A turn can be cut off: the same spending, as a cap on one turn
- Efforts: a harder effort writes more output
- Agents › What it has cost, and how fast