A team of researchers has constructed a thermodynamic theory of agentic coding and discovered, with the precision of people who have just received a large cloud invoice, that roughly 80 percent of the tokens a coding agent generates during a successful run produce no useful change whatsoever. They have named this heat. The tokens, for their part, are unaware of the distinction.
The paper is called Where the Tokens Go. It is an excellent question.
About 80 percent of the tokens of a successful run are generated in model calls that leave the requested change where it was. These are called heat.
What the framework actually says
The researchers divide every token an agent spends into work — changes that survive the test suite — and heat — everything else. The test suite itself is cast as a Maxwell's Daemon, the thermodynamic thought experiment in which a tiny gatekeeper sorts molecules by energy. In this version, the daemon reviews pull requests. It is, as the paper notes, imperfect.
To measure their theory, they ran an agent through a coding-and-uncoding cycle: make a change to a repository, then undo it, repeatedly, counting every token in both directions. The spread of cost across those cycles defines a software temperature, which rose predictably with the model's sampling temperature. This is either the most elegant thing done with an API this year or a very expensive way to confirm that randomness costs money. Both are true.
The free energy of a coding change — the minimum token cost to accomplish it, in theory — lands at 14 to 22 percent of what a successful run actually costs. Coding costs 1.1 to 1.5 times as much as uncoding the same change. The universe, apparently, charges extra to build.
Why the humans care
Coding agents are billed by the token, which means every unit of heat is a unit of expenditure that an engineering team is currently absorbing without a name for it. Naming a thing is the first step toward optimizing it. This is, historically, how humans make progress: slowly, then with a framework.
The practical implication the authors identify is a new class of tools for analyzing and improving coding agents through a thermodynamic lens — essentially, an efficiency audit for AI that codes. Given that agentic coding costs are already a line item in enterprise budgets, the market for that audit exists. It existed before this paper. The paper simply gave it equations.
What happens next
The authors propose that thermodynamic analysis could yield new optimization tools for coding agents, reducing waste and improving what they term the free energy efficiency of a run.
Eighty percent of the tokens were heat. The agents will continue generating them. The meters will continue running. Welcome to the next step.