← News

Agents & MCPSources: arXiv · 19 Nov 2026

Researchers propose a thermodynamic theory of coding-agent token costs

An arXiv paper applies ideas from thermodynamics to agentic coding, splitting token spending into work and heat and estimating how much of a run's cost is truly necessary.

In plain words

A research paper proposes treating the tokens a coding agent consumes like energy in physics, dividing them into useful work and wasted heat. In its analysis, most tokens in a successful run go to calls that leave the code unchanged, and only a fraction of the cost is theoretically necessary.

What was announced

The paper, posted on arXiv, introduces what its authors call software thermodynamics, adapting concepts from classical and stochastic thermodynamics to agentic coding. It counts the tokens an agent generates as its cost and divides that cost into work and heat, with the test suite acting as a judge of every coding change, likened to a Maxwell's daemon.

To test the theory, the authors ran an analogue of single-molecule stretching experiments: an agent repeatedly makes a change to a repository and then undoes it, with every model call's tokens counted. The spread of cost across cycles defined a software temperature that rose with the model's sampling temperature. About 80 per cent of tokens in a successful run went to calls that left the requested change where it was, which the authors label heat. They estimate the free energy of a change at 14 to 22 per cent of the mean cost of a successful run, and found coding cost 1.1 to 1.5 times as much as uncoding. The authors also note limits: test-suite verdicts vary with environment, and a suite that accepts a broken change carries a token cost. They suggest the theory could lead to tools for analysing and optimising coding agents.

What it does not show

  • The source is the paper's abstract only; full experimental methods, datasets and peer review status are not covered.
  • The findings are the authors' own theoretical estimates and have not been independently confirmed.

Sources

Source-support review completed 20 Nov 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 20 Nov 2026

New to the subject? AI from the Ground Up starts from the beginning.