Where the Tokens Go: Heat, Entropy and Error in Agentic Coding · Alán Aspuru-Guzik and Varinia Bernales, University of Toronto · arXiv, November 17, 2026
A flaky test suite caught no more planted defects than one file's own tests
Most of the paper borrows thermodynamics, which the authors say they apply "by analogy." They report that about 80 per cent of the tokens in a successful run come from model calls that leave the requested change where it was, and that coding costs 1.1 to 1.5 times as much as uncoding. The result a practitioner can use is in section 2.6, and it involved no agent at all. In sixty trials on three machines, the authors planted a defect half the time and drew one of three gates: no gate, the changed file's tests, or the whole suite. Each gate met eight planted defects. The file's own tests stopped three of them, and so did the whole suite.
The full suite fails some tests even on clean code, so the harness passed any tree with up to three times the failures of one clean run. On the machine whose clean run failed 11 tests, a planted defect produced 8 to 12 failures and passed every time. Setting the threshold from twelve clean runs instead, at 23 and 10 failures on two machines, did not help: the suite then stopped two of its eight defects. The authors say sixty trials "cannot tell the two gates apart."
Why it matters: If an agent's merge gate is the full suite with a tolerance for flaky failures, that tolerance can be wider than the signal a real defect produces. The authors' remedy is to remove tests that fail on clean code, not to tune the threshold. The sample is small, but the check is cheap: run your clean suite a few times and compare the spread with the failures one planted bug causes.