# AI agents don't buy tokens. They buy outcomes.

A router reads a price tag and picks the cheapest model. Then the task runs, and the receipt keeps printing long after the price stops. The real economic unit is cost per successful task, so do not route to the cheapest model; route to the cheapest completed outcome.

By Michael Cengkuru · 30 Jun 2026 · Interactive version: https://cengkuru.com/essays/the-missing-meter/

## The story

In a chat box, price per token feels like a useful number. You ask, it answers, you count the tokens. The router sees a price tag: a small model at $0.75 per million input tokens, against $5 or more on the frontier tier, and it selects the cheapest. That number never changes during the task. But the receipt does. One finished task accrues line items the price tag never mentions: a first attempt, the context re-read again and again, a schema error and a retry, tool calls that read files and run them and read again, a fallback to a stronger model when the cheap one stalls, and finally a human fixing the patch by hand. The price tag stays small while the receipt grows.

The mistake is not "cheap models are bad." That is lazy and false. The mistake is subtler: we optimise the cost of a step instead of the cost of finishing the job. Cheap tokens are not cheap if they do not finish. One scope note the essay carries throughout: the measured evidence comes mainly from coding agents, where trajectories, tools, tests and success conditions are observable. The discipline very likely applies more broadly; the exact magnitudes do not.

Where does an agent's cost actually go? Chat is a line: prompt in, answer out. An agent is a loop: plan, call a tool, read what it returns, then fold the whole growing context back into the next request and do it again. The output stays a small visible sliver; the input side snowballs. This part is cited. Bai et al. (2026), studying eight frontier models on SWE-bench Verified, found agentic coding consumed about 1000x more tokens than code reasoning or chat, and that input tokens, not output, drove overall cost. Stanford's Digital Economy Lab calls it the context snowball. Cursor's 2026 developer-habits report puts input above 90% of non-cache token volume, with the input/output ratio rising from about 4.5x in January to roughly 11x to 13x by April and May. One honest nuance: input and cached tokens are cheaper per token than output, but the sheer volume can still dominate the receipt.

Could you just estimate the cost up front? No. Also cited: runs on the same task varied by up to 30x in total tokens, higher token use did not reliably improve accuracy, and models systematically underestimated their own usage, with self-prediction correlations only up to 0.39, barely better than a hunch. The agent cannot price the journey before it walks it. So you need a meter after the run, not confidence before it.

The essay's centrepiece prints two receipts for the same task: a cheap-first route that starts on the small model, and a measured route that uses a stronger model where the data says it pays. These numbers are illustrative, and the essay labels them as such: they show the shape of an honest comparison, not a verdict about any named model. On a small, well-specified task the cheap route finishes in one clean pass at 1.0 relative units against 3.0, and genuinely wins. On a bug fix that must pass tests, the cheap route loops: a format error, a retry, a fallback to a stronger model, a human repair, totalling 8.2 units against the measured route's 4.4. On a repository migration the cheap route may never converge at all, while the measured route completes at 9.0. Same model, same price tag, a different bill once completion is counted.

This is not premium-model propaganda. The cheap model still wins simple work; it just has to win after the retries are counted. Cheap-first earns the simple work and loses the hard work to its own retries.

What is missing is not a better model. It is an outcome ledger. Model-versus-model comparison is a crowded lane that goes stale every release. A good router should keep a live ledger, by task type, and let the measured history decide. The routing rule stops being "which model is cheapest?" and becomes "which model has the lowest measured cost to finish this kind of task?", a different answer for an edit, a bug fix, and a migration. The ledger's numbers in the essay are illustrative; the structure is the contribution.

The gate at the end asks whether you can measure eight things before you change a routing policy: tokens to completion including the re-reads, retries, format failures, fallbacks to a stronger model, a defined success rather than an assumed one, latency, human repair time, and results split by task type. Until then you have a price preference, not a cost strategy: a guess wearing the costume of a decision. A higher per-token price is justified only after measured tokens-to-completion prove it lowers cost per successful outcome.

The verdict: do not route to the cheapest model. Route to the cheapest completed outcome. Log the attempts, the fallbacks, the failures, and the human repairs, then route the next task from the ledger, not the leaderboard. A price tag is not a receipt.

## The data

| Figure | Evidence grade | As the essay labels it |
| --- | --- | --- |
| Agentic coding consumed about 1000x more tokens than code reasoning or chat | Cited | Bai et al. 2026, eight frontier models on SWE-bench Verified |
| Input tokens, not output, drove overall cost | Cited | Bai et al. 2026 |
| Runs on the same task varied by up to 30x in total tokens | Cited | Bai et al. 2026 |
| Higher token use did not reliably improve accuracy | Cited | Bai et al. 2026 |
| Models underestimated their own usage; self-prediction correlation up to 0.39 | Cited | Bai et al. 2026 |
| The "context snowball" framing | Cited | Stanford Digital Economy Lab 2026 |
| Input/output token ratio about 4.5x (January) rising to roughly 11x to 13x (April, May) | Cited | Cursor 2026 developer-habits report |
| Input above 90% of non-cache token volume | Cited | Cursor 2026 |
| Input context rising toward about 70% of price-equivalent cost | Cited | Cursor 2026 |
| $0.75 per million input tokens (small model) vs $5+ on the frontier tier | Cited, but volatile | Vendor pricing pages; the essay leans on the gap between tiers and one indicative small-tier figure, not on any single price staying current |
| Hero receipt line items (retry, fallback, human repair) | Illustrative | A schematic of where agent cost accrues, not a real invoice |
| Guided receipts: 1.0 vs 3.0 (small edit), 8.2 vs 4.4 (bug fix), fails vs 9.0 (migration), in relative units | Illustrative | The shape of an honest comparison, not a verdict about any named model |
| Calculator defaults: 4.5 vs 1.3 average attempts, 55% vs 88% success | Illustrative | A calculator, not proof; starting values are an example you can change |
| Ledger rows: retry 1.1x, 1.4x, 1.2x; success 96%, 89%, 93% | Illustrative | The numbers are illustrative; the structure, cost per success by task type, is the contribution |
| Evidence base is mainly coding agents; the discipline generalises, the magnitudes do not | Scope (Inferred) | The essay's own scope chip |

## Sources

- Bai et al. (2026). How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks. arXiv:2604.22750. https://arxiv.org/abs/2604.22750
- Stanford Digital Economy Lab (2026). How Do AI Agents Spend Your Money? (summary). https://digitaleconomy.stanford.edu/publication/how-do-ai-agents-spend-your-money-analyzing-and-predicting-token-consumption-in-agentic-coding-tasks/
- Cursor (2026). Developer Habits Report. https://cursor.com/insights
- Vendor pricing pages (2026). Cited but volatile: the essay relies on the gap between tiers, noting exact list prices change often, and that tool-use pricing bills input tokens, output tokens, and possibly server-side tool charges. No single URL is named.
