← In the News

A study of 600 coding-agent runs finds turn count explains 84% of cost variance

Turns, Not Observations: Cache-Aware Loop Engineering for Coding Agents · Pramod Kumar and Raj Kumar Pandey · arXiv, October 10, 2026; published in the proceedings of the PromptOps and Vibe Coding workshop at ASE 2026

Machine-readable Download Markdown

The authors re-scored 600 publicly released coding-agent trajectories from two agent scaffolds and two open-weight models. Median tool observations were small, 118 to 286 tokens, and the large build logs often used to justify output compression sat near the 99th percentile. Prefix caching served 98.6% of input tokens, so pricing every input token at the flat rate overstated loop cost by roughly 7x on average (7.1x in the conclusion).

The cost driver was the number of turns. Turn count explained 84% of the variance in log trajectory cost; mean observation size explained 4%. The most expensive runs had the most turns and the smallest observations. The authors also report that model delegation, sending selected turns to a cheaper model, raised cost in half of the settings they tested, close to the break-even condition they derive. The paper releases a tool, TurnCost, for re-scoring trajectory sets under different caching and pricing assumptions.

The authors list their own limits. The corpus was built as distillation data and excludes runs that hit an iteration limit, so the observation-size medians are "indicative rather than exact." The turn-count relationship is partly mechanical, because cost is a sum over turns, though cost grew faster than turn count (exponent 1.23). The models are open-weight, not frontier proprietary agents. They also say they have not shown that turns can be removed without hurting task success. We read the abstract, introduction, limitations and conclusion; we did not check the per-setting results behind the delegation finding.

Why it matters: If you are tuning an agent loop for cost, this is evidence to count turns and cache behavior before you spend effort shrinking tool output or routing steps to cheaper models. The open question is the one the authors name: which turns are removable without losing the result.