Skip to content
DraconiticResearch
Search Sources API
276,906 studies31 sourcesUpdated 27 min ago
PreprintCC BY-NC-ND 4.0arXiv

Where the Tokens Go: Heat, Entropy and Error in Agentic Coding

Abstract

Coding agents are billed by the token, yet software engineering says nothing about what a token actually buys. Here we introduce a theory of software thermodynamics. The theory draws analogues from classical and stochastic thermodynamics, extends them, and applies them to modern agentic coding. We count the tokens an agent generates as its cost and divide that cost into work and heat. The test suite acts as a software Maxwell's daemon that judges every coding change. We test the theory with an analogue of the experiments in which a single molecule is pulled open and let fold again: an agent makes a change to a repository (coding) and then undoes it (uncoding), many times over, and we count the tokens of every model call. The cycle returns the requested edits to where they began, with each direction started from a stored reference tree, and the spread of its cost over repeated cycles defines a software temperature, which rose with the sampling temperature of the model. About 80 per cent of the tokens of a successful run are generated in model calls that leave the requested change where it was, and we call these tokens heat. The free energy of a change, which we estimate by analogy with the equality of Jarzynski, is 14 to 22 per cent of the mean cost of a successful coding run. Coding costs 1.1 to 1.5 times as much as uncoding. The daemon is imperfect: the verdict of a test suite varies with its environment, and a suite that accepts a broken change has a cost in tokens. The practical implication of the proposed theory could be new tools for analysing and optimising coding agents through the lens of thermodynamics.

Related

  1. Where the Error Lives: Separating Lid-Edge and Body-Induced Error in Neural Pressure Prediction for 3D Cavity Flow
    Zirun Zhou, Zhi-Qian Zhang, Yixuan Hong +3
    arXivPreprintCC BY 4.0Full textFluid dynamicsarXiv
  2. A class of high-order discontinuous-Galerkin methods satisfying infinitely many entropy conditions with provable error estimates and strong convergence for general nonlinear conservation laws
    Yuanzhe Wei, Chi-Wang Shu
    arXivPreprintarXiv licenceFull textNumerical analysis & scientific computingComputational physicsarXiv
  3. Entropy threshold: A simple proxy for performance of quantum error correction
    Diego Ruiz, Aleksander Kubica
    arXivPreprintCC BY 4.0Full textQuantum physics & quantum informationarXiv
  4. Beyond RMSE and Granger Gain: Multi-Horizon Forecast-Error Entropy for Nonlinear Predictive Coupling
    Andrei Velichko
    arXivPreprintarXiv licenceFull textStatistical & nonlinear physicsarXiv
  5. Scaling Collider Event Generation with Residual-Quantized Tokens
    Dan Godi, Dmitrii Kobylianskii, Eilam Gross
    arXivPreprintCC BY 4.0Full textComputational physicsHigh-energy & particle physicsarXiv
BibTeX
@misc{aspuruguzik2026where,
  title = {{Where the Tokens Go: Heat, Entropy and Error in Agentic Coding}},
  author = {Alán Aspuru-Guzik and Varinia Bernales},
  howpublished = {arXiv},
  year = {2026},
  month = nov,
  doi = {10.48550/arxiv.2611.23375},
  eprint = {2611.23375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23375},
  note = {CC BY-NC-ND 4.0},
}
RIS
TY  - UNPB
TI  - Where the Tokens Go: Heat, Entropy and Error in Agentic Coding
AU  - Alán Aspuru-Guzik
AU  - Varinia Bernales
PY  - 2026
DA  - 2026/11/17
PB  - arXiv
DO  - 10.48550/arxiv.2611.23375
UR  - https://arxiv.org/abs/2611.23375
AB  - Coding agents are billed by the token, yet software engineering says nothing about what a token actually buys. Here we introduce a theory of software thermodynamics. The theory draws analogues from classical and stochastic thermodynamics, extends them, and applies them to modern agentic coding. We count the tokens an agent generates as its cost and divide that cost into work and heat. The test suite acts as a software Maxwell's daemon that judges every coding change. We test the theory with an analogue of the experiments in which a single molecule is pulled open and let fold again: an agent makes a change to a repository (coding) and then undoes it (uncoding), many times over, and we count the tokens of every model call. The cycle returns the requested edits to where they began, with each direction started from a stored reference tree, and the spread of its cost over repeated cycles defines a software temperature, which rose with the sampling temperature of the model. About 80 per cent of the tokens of a successful run are generated in model calls that leave the requested change where it was, and we call these tokens heat. The free energy of a change, which we estimate by analogy with the equality of Jarzynski, is 14 to 22 per cent of the mean cost of a successful coding run. Coding costs 1.1 to 1.5 times as much as uncoding. The daemon is imperfect: the verdict of a test suite varies with its environment, and a suite that accepts a broken change has a cost in tokens. The practical implication of the proposed theory could be new tools for analysing and optimising coding agents through the lens of thermodynamics.
ER  -