Skip to content
AI News HubLIVE
Original source3 min read

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

Summary

A new paper proposes a "software thermodynamics" theory that divides the token cost of agentic coding into work and heat. Experiments show about 80% of tokens in a successful run are generated in model calls that leave the requested change unchanged—termed heat—while the free energy of a change is only 14–22% of the mean cost, and coding costs 1.1–1.5 times as much as uncoding.

SourcearXiv AIAuthor: Al\'an Aspuru-Guzik, Varinia Bernales
Where the Tokens Go: Heat, Entropy and Error in Agentic Coding
Report an error

The correction channel is not available yet. You can copy the article reference below for later.

Correction instructions
Read article

[Submitted on 17 Nov 2026]

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

View a PDF of the paper titled Where the Tokens Go: Heat, Entropy and Error in Agentic Coding, by Al\'an Aspuru-Guzik and Varinia Bernales

View PDF HTML (experimental)

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.

Comments: 43 pages, 10 figures, 11 tables; includes supplementary information with 3 further figures

Subjects:

Artificial Intelligence (cs.AI); Statistical Mechanics (cond-mat.stat-mech); Software Engineering (cs.SE)

ACM classes: D.2.8; I.2.2

Cite as: arXiv:2611.23375 [cs.AI]

(or arXiv:2611.23375v1 [cs.AI] for this version)

https://doi.org/10.48550/arXiv.2611.23375

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Alán Aspuru-Guzik [view email] [v1] Tue, 17 Nov 2026 19:00:02 UTC (2,298 KB)

Full-text links:

Access Paper:

View a PDF of the paper titled Where the Tokens Go: Heat, Entropy and Error in Agentic Coding, by Al\'an Aspuru-Guzik and Varinia Bernales

View PDF

HTML (experimental)

TeX Source

view license

Additional Features

Audio Summary

Current browse context:

cs.AI

new | recent | 2026-11

Change to browse by:

cond-mat cond-mat.stat-mech cs cs.SE

References & Citations

SciX

Google Scholar

Semantic Scholar

Loading...

Data provided by:

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)

Key points and analysis

Article intelligence

EngineersAdvanced

Key points

  • The paper introduces software thermodynamics, analogizing token cost to work and heat.
  • About 80% of tokens in a successful run are "heat"—calls that do not actually change the requested edit.
  • The free energy of a change is estimated at 14–22% of the mean cost of a successful coding run.
  • Coding costs 1.1–1.5 times as much as uncoding, and test suites act as imperfect Maxwell's daemons.

Highlights and analysis are generated automatically and may contain errors. Check the original source.