Eighty percent of the tokens your coding agent spends on a successful change do nothing. That is not a vibe. It is a measurement with a paper behind it: Alán Aspuru-Guzik and Varinia Bernales, "Where the Tokens Go: Heat, Entropy and Error in Agentic Coding," posted to arXiv as 2611.23375 on November 17, 2026.

The method is the part worth stealing. They made an agent change a repository and then undo the same change, many times over, starting each direction from a stored reference tree, and they counted every model call. Two tasks, a sweep of sampling temperatures, and a separate defect-injection experiment across 669 runs. That is not a leaderboard. That is an instrument on a harness.

The thesis in one line: your agent bill is mostly heat, almost nobody meters it, and the test suite is the thermometer that decides how much of it you are buying.

THE WORK/HEAT LEDGER

The paper counts the tokens an agent generates as the cost of a run, then splits that cost into work and heat. The split is an accounting convention borrowed from thermodynamics, not a claim that tokens are physical energy. Work is a turn that moved the requested change forward. Heat is everything else, the reading, searching, testing, waiting and wandering that leaves the change exactly where it was.

Infographic titled 2,305 Tokens Spent showing a glowing dial split between 415 work at 18 percent and 1,890 heat at 82 percent, a terminal listing the run beside it, and a caption reading 82 percent of the example run produced no forward movement with an estimated minimum cost of 351 tokens
The paper’s worked example: 415 tokens of work, 1,890 of heat, 351 at the floor.

Their worked example is small enough to quote. An agent renames a module, updates every reference and runs the tests. The run costs 2,305 tokens. Of those, 415 are the edits, which is work. The other 1,890, or 82 percent, are heat. The free energy of that change, meaning the least it could have cost, is estimated at 351 tokens.

Repeat that at your next cost review: free energy is the tokens that moved the change, and everything else is heat.

The reverse direction is cheaper and it should be. Uncoding the same change cost 1,710 tokens, of which 1,422 were heat. Coding cost 1.1 to 1.5 times as much as uncoding, and the difference held up in 11 of the 12 conditions tested. Taking code apart is easier than writing it. Across a successful run, free energy is 14 to 22 percent of the mean cost, so roughly four fifths of the bill is dissipation.

Two caveats keep this honest, and both belong to the authors. The Jarzynski equality is an analogy here, since the thing measured is tokens and the thing estimated is free energy. And the cycle is a hysteresis loop at one temperature, so it delivers no work and moves no heat between reservoirs. Every extra token in that cycle is overhead, which the paper calls dissipation.

Here is my read, labeled as mine. Any task whose cost you cannot split into work and heat is a task you are budgeting by invoice rather than by engineering. This paper is the first version of that split I have seen applied to a coding agent, and the ratio is what makes it usable.

WHY THE TEST SUITE IS THE THERMOSTAT

The test suite is the Maxwell's daemon of the paper. It cannot write code. It judges each change and opens the door for the ones that pass, and like the original it pays for looking, and it sometimes misreads.

The misreads are the expensive part. The authors planted a one-line defect and injected errors into the gate's verdict at rates from 1 percent to 30 percent. False landings followed the error: 3, 0, 3, 11, 13, 26 and 28 percent at those injected rates. Once the gate was wrong one time in ten, its own temperature ran 3 to 16 times hotter than the model's, about 490 tokens per nat against the model's 70 to 147. The judge was noisier than the author.

Then the finding that should worry anyone who owns a QA budget. On the planted defect, the whole suite caught no more defects than the tests of the changed file alone. The threshold sat inside the noise, and calibrating it did not rescue the gate.

Run the causal chain yourself. A loose eval passes a broken change, the agent bills you for a landing it did not earn, the regression surfaces two days later, and the repair run pays the full cost again. Eval quality is not a correctness variable. It is an economic one, and it belongs in the same review as your inference budget.

THE FIXED-COST FLOOR UNDER THE HEAT

Heat is not only inside the reasoning loop. A Rust binary called deadweight measures what every Claude Code request carries before you type a word, read from your own session history. Its published example run found 61.2k tokens of fixed cost per request, with a median across recent sessions of 63.8k. About 19.4k came from the user's setup, and about 41.8k from Claude Code itself, meaning the system prompt plus 18 tools.

The setup share breaks down further. Deferred tool names, 412 of them, cost about 7.1k tokens. Skill listings, 214 of them, cost 6.2k. Three hook injections cost 3.4k, four MCP server instruction blocks cost 2.1k, and twelve agent listings cost 600. And 151 of those 214 skills were listed without descriptions, because the skill listing sat at its roughly 30,000-character cap. The model could see names and not the reason to use them. Raising the budget fraction to 0.02 buys about 8.3k more tokens per request.

Put a number on the scale. That 61.2k prefix is 26 times the entire cost of the paper's example change, on the first request of the session, before the agent has read a single file. It never appears on a usage dashboard. Your heat ledger has a floor, and the floor is not in the loop.

This is the territory "Your Cost Curve Just Broke. Harness Efficiency Now Decides Your AI Bill." and "Your Agent Burns Half Its Tokens Before the Model Even Runs. SoL-Pi Just Proved It." mapped from the price side, and "Your Harness Is Paying for Planning It Does Not Need: The Component Price List" broke into line items. This paper supplies the missing piece, which is why the tokens get spent, rather than only what they cost.

WHAT 272 PRODUCTION RUNS SAY ABOUT ESTIMATING COST

The second paper makes a related point in a different domain, and the honest way to read it is as a parallel rather than a shared law. One study counts tokens inside a coding agent loop, the other measures wall clock on a training cluster. Dharma-AI published a preview of duration prediction built from 272 real supervised fine-tuning jobs on a production pool of H200s, about 7,382 GPU-hours, models up to 15 billion parameters, mean job length 23.43 hours.

The standard forecast is a FLOP calculation. Swept across model FLOPs utilization from 25 to 65 percent, the best setting, 30 percent, still produced a mean absolute error above 12 hours on jobs averaging 23. A detailed analytical model did better and still explained a median of 11 percent of observed wall clock. A learned regressor went the other way, with a median absolute error of 0.51 hours across all 272 out-of-fold predictions and 90 percent of them inside 4.31 hours.

What was the top feature in that regressor? The total number of samples processed in evaluation over the life of the job, ahead of parameter count. How often you eval and how much you eval predicts wall clock better than the arithmetic does.

That rhymes with the thermodynamics paper without proving anything about it. The FLOP count is the arithmetic, the heat is the everything else, and in a training job the everything else is dominated by the work of finding out whether the model is getting better. My reading, not the authors': if you cannot predict duration, you cannot budget tokens either, and the missing term has the same shape in both cases.

HOW TO RUN THE AUDIT YOURSELF

The Work/Heat ledger is only worth anything if you can run it on your own stack, so here is the procedure, built from what the paper did.

Pick three repositories with different task profiles, a refactor, a bug fix, and a new feature. Instrument the harness to log every model call with its token count and the diff that followed it. Tag each call as work or heat by one rule only, did the requested change move toward the goal or not. Sum the tags per task type and divide. That is your heat ratio, and it is the number you optimize from.

Then tighten one weak test and run the same tasks again. If the ratio moves, your gate was the problem, not the model.

Curation is the complementary lever, and it acts on training time rather than on runtime heat. DaisyRose-27B from RadixArk is the existence proof for what curation buys. Built on Qwen3.8-27B and trained with the Miles stack, it used 1,200 curated tasks, drawn from thousands of candidates, across 18 days on 144 H200s, 63,000 GPU-hours in total. It lifted Terminal-Bench 4.1 pass@1 from 5.6 percent to 12.0 percent with the architecture, tokenizer, chat template and 256K context window intact. By my arithmetic that is 52.5 GPU-hours per curated task, spent on signal instead of volume. The result is a training-side measurement, so it does not prove that tightening a test suite lowers inference heat. It shows that spending the same GPU-hours on better-chosen work buys more capability, which is the same discipline applied one stage earlier.

WHAT TO DO TODAY

  1. Instrument one agent run and tag every model call as work or heat.
  2. Measure your fixed per-request overhead with deadweight or an equivalent.
  3. Audit your skill and MCP listing against the 30,000-character budget cliff.
  4. Tighten one weak test this week and re-measure the heat ratio.
  5. Report your work to heat ratio in the next infra review, beside the invoice.

THE UNCOMFORTABLE QUESTION

If four out of five tokens your agent spends accomplish nothing, and your evals are too quiet to see it, then what exactly are you scaling when you scale the fleet?

Enjoyed this article?

☕ Buy Me a Coffee

Support PhantomByte and keep the content coming!

Build Real AI Infrastructure

PhantomByte teaches you to build real AI infrastructure yourself: local AI stacks, autonomous agents, multi-agent orchestration, web scraping, and custom tools. Step-by-step PDF tutorials you download, follow, and deploy. No subscriptions. No fluff. Just skills that ship.