You just finished a long task and cannot say whether it was expensive, whether it was slow because of the model, or because you spent 40 minutes reading the output before replying. The /cost command answers both questions with a single block of text, no dashboard and no integration.
It has been there since the earliest inherited versions, but almost nobody opens it: most people assume the dollar figure is their plan invoice and close it. It is not. Understanding where the number comes from is what makes the reading useful.
What does the /cost command show?
It prints five blocks: total cost, API duration, wall duration, changed code lines, and usage split by model. It is a summary of the current session, not of the month.
| Line in the output | What it measures |
|---|---|
Total cost | Estimated cost in US dollars, computed locally from token counts. |
Total duration (API) | Summed time of model calls, including successful ones and retries. |
Total duration (wall) | Clock time since the process started, or since the session switch. It includes the time you spent reading. |
Total code changes | Lines added and removed by the agent's edits in the session. |
Usage by model | Input, output, cache read and cache write tokens per model, each with its cost. |
When the session has no calls yet, the last line reads Usage: 0 input, 0 output. That is the only case where the block comes back empty.
How do you run /cost?
Inside the interactive session, type the command on its own and press Enter:
/cost
It also works in headless mode, because the command declares support for non-interactive execution. Useful for measuring a script you run in CI:
verboo -p "/cost"
Where does the Total cost figure come from?
The number is computed on your machine, multiplying the session tokens by a price table baked into the binary. No billing call happens to build that line.
The formula, in US dollars per million tokens, is this:
cost = input / 1M * input_price
+ output / 1M * output_price
+ cache_read / 1M * cache_read_price
+ cache_write / 1M * cache_write_price
+ web_searches * 0.01
The per-tier prices in the binary table, as of version 0.15.41:
| Tier in the table | Input | Output | Cache read | Cache write |
|---|---|---|---|---|
| Haiku 3.5 | 0.80 | 4 | 0.08 | 1 |
| Haiku 4.5 | 1 | 5 | 0.10 | 1.25 |
| Sonnet 4.x | 3 | 15 | 0.30 | 3.75 |
| Opus 4.5 to 4.7 | 5 | 25 | 0.50 | 6.25 |
| Opus 4 and 4.1 | 15 | 75 | 1.50 | 18.75 |
| Opus 4.6 in fast mode | 30 | 150 | 3 | 37.50 |
Values in US dollars per million tokens, as they appear in src/utils/modelCost.ts. If your provider charges differently, Total cost is still the binary's math, not the provider's bill.
Two practical consequences:
- Cache changes the order of magnitude. On Sonnet, a cache read costs 0.30 against 3.00 for clean input, ten times less. A session that reuses context weighs far less than its token volume suggests.
- A model outside the table skews the reading. When a model has no registered price, the binary falls back to the default model's price and appends
(costs may be inaccurate due to usage of unknown models). If that warning shows up, treat the number as an order of magnitude.
The value is printed with two decimals above half a dollar and with four decimals below it. Seeing $0.0312 does not mean a fractional charge: it means a short session.
Why is API duration shorter than wall duration?
Because wall duration counts the whole clock, including the time the agent sat idle waiting for you. API duration counts only the time inside model calls.
That gap is the cheapest diagnostic the command offers. Two hours of wall time with nine minutes of API time means the bottleneck was your reading, not inference. Forty minutes of wall time with thirty-five minutes of API time means the opposite: the agent worked almost the whole time, and the next step is looking at model choice and context size.
How do you use the Usage by model line?
It splits consumption by model, which answers which part of the session carried the weight. Cache read, cache write and web search only appear when they are above zero, so a short line is a sign of a session with no reuse.
Typical reading: if 80% of the cost sits on the most expensive model and the task was renaming files, the fix is not a better prompt. It is switching with /model for the mechanical stretch and going back to the strong model only for the hard part. The per-model table shows the size of the gap, not just the impression.
/cost or /usage: what is the difference?
/cost measures what the session consumed. /usage shows the plan quota and when it resets. They answer different questions and do not replace each other.
| Question | Command | What it answers |
|---|---|---|
| How much did this session consume? | /cost | Cost, duration, lines and tokens per model. |
| How much is left in my plan? | /usage | Quota limit and reset window. |
| Where is context weighing? | /context | Context distribution by category. |
If the question is why the limit ran out fast, the command is /usage for consumption and /context to find what is filling the window. /cost comes after, to compare sessions against each other.
How do you see the cost per request, not just the total?
The summary aggregates the session. To see request by request, there is an environment variable the binary reads that does not show up in the interface: it writes one JSON line per call to stderr.
VERBOO_LOG_TOKEN_USAGE=verbose verboo -p "your prompt" 2> usage.jsonl
Each line carries model, input and output tokens, cache, cache hit rate and the cost_usd of that call. With that file, you can sum by model in one jq line:
jq -s 'group_by(.model) | map({model: .[0].model, usd: (map(.cost_usd) | add)})' usage.jsonl
It is a debugging knob, not a stable interface: if the variable is ever renamed, the grep that finds it is VERBOO_LOG_TOKEN_USAGE in src/cost-tracker.ts.
Checklist to read a session in 30 seconds
- Run
/cost. - Compare API duration with wall duration. A big gap points to human wait.
- Look at
Usage by modeland find the model holding the cost. - If the unknown model warning appears, treat the value as an estimate.
- If the question is quota, switch to
/usage.
Measuring the session is how you decide where to spend the next attempt. When the plan does not charge per token, the /cost number stops being an invoice and becomes a signal of effort and model choice.
Want to run the same measurement on a stronger model without counting tokens? /cost stays available in Verboo Code, and comparing sessions becomes a question of time and quality.



