arXiv AI By Al\'an Aspuru-Guzik, Varinia Bernales

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

Read the original on arXiv AI →

The paper introduces a theory of software thermodynamics for coding agents, treating token usage as a cost that can be split into work and heat. By running cycles of coding and uncoding on a repository and measuring tokens, the authors define a software temperature and estimate free energy using a Jarzynski-like equality. They find that about 80 % of tokens are heat, free energy is 14–22 % of the mean cost, and coding is 1.1–1.5 times more expensive than uncoding, with test suites acting as imperfect Maxwell’s demons.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv AI.

arXiv AI
6d ago

Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching

The paper investigates how adding or removing context in large language model coding agents affects cost and performance. Using over 20,000 runs on SWE‑bench, Loc‑Bench, and Verified, the authors find that retrieved code can reduce read and search commands but may increase overall cost when cached input is cheaper. Removing old observations can either save or increase cost depending on cache pricing, and shorter prompts do not necessarily lead to cheaper runs because agents may take more steps. The study also highlights that shared cached prefixes in concurrent experiments can distort cost comparisons.

By Zerui Yang, Miaomiao Dong, Quan Xue, Chaorui Zhang, Xuanyu Zheng, Xiyuan Wang, Haolin Ruan, Xueyan Niu, Guangcheng Song, Weixi Zhang, Wei Han, Bo Bai