Autonomous software engineering benchmarks previously evaluated systems purely on final submitted code, but granular tracking of step-by-step executions shows that working solutions appear early while operations continue long after. Musa Cim, Burak Topcu, and Mahmut Taylan Kandemir, researchers at The Pennsylvania State University, analyzed agent execution trajectories across five models, two agent frameworks, and three SWE-bench datasets by recording and testing every distinct repository patch generated during execution. Termination lag measures the number of steps between an agent's first correct patch and the end of its run. As Musa Cim and colleagues demonstrated, this unmonitored operational tail conceals substantial financial waste: autonomous coding agents do not stop when a problem is solved, burning inference budgets on unnecessary cycles.
Evaluating systems solely on the final patch conceals when a viable fix was actually attained, an oversight that obscures execution duration, token consumption, and compute costs. A central question facing technical leaders deploying autonomous workflows is how much unnecessary expenditure businesses absorb while coding agents deliberate past a working solution. The Pennsylvania State University study recorded the time to first correct patch, or TTFCP, alongside the subsequent termination lag, or TL. The core evaluation evaluated Qwen3-Coder and Laguna-XS.2 on SWE-bench Verified and Multilingual. Analysis reveals that 38 to 82 percent of successful runs achieve a correct solution on their initial source-code edit, yet, as the researchers observe, agents persist in generating commands instead of halting, burning through resources on redundant compute steps and tokens.
The Anatomy of Termination Lag
Post-solution steps account for a median of 35 to 37 percent for Qwen3-Coder and 54 to 60 percent for Laguna-XS.2 in successful runs on SWE-bench Verified and Multilingual. On SWE-bench Verified, Qwen3-Coder's first source-code edit passes benchmark tests in 82 percent of runs that reach a correct patch. The researchers tested generalization with Claude Haiku 5.5 and GPT-6 Luna on SWE-bench Verified, with Seed-OSS on SWE-bench Pro, and under the Mini-SWE agent framework, confirming that termination lag persists across diverse model architectures.
"Every additional agent step leads to another model call over a growing context, adding tokens, latency, and compute, in addition to introducing the risk of breaking code that already works."
As the Penn State researchers emphasized in their report, every expanded context window amplifies the unit cost of execution without generating marginal value. Agents spend most of their additional steps verifying their work and exploring the repository. Specifically, verification accounts for 48 to 63 percent and exploration for another 15 to 29 percent of agent steps after the first correct patch, whereas further source-code modifications remain rare in most environments. Earlier architectural research exposed related pipeline vulnerabilities: as researchers Shaohuang Wang, Jinghao Wen, Xulei Zhang, and Xun Jiao showed, multi-agent system failures enter early, recording a median fault arrival at 0.18 of the total run across 95 failed runs. In autonomous coding pipelines, the primary issue is the inverse: the correct fix arrives almost immediately, but the system lacks the stopping mechanism required to exit.
Verification Costs and Code Degradation
Defenders of prolonged execution cycles argue that some verification is necessary because agents cannot see benchmark tests and must rely on their own internal evidence to judge correctness. While an agent requires verification routines to validate functionality before pushing code, empirical tracking proves that excessive self-checking carries a measurable penalty. Most runs retain the correct patch to the end at 61 to 96 percent. However, continued execution creates direct code regressions: in 1 to 8 percent of cases, continued activity leads agents to undo their earlier correct patch, break the working solution, and submit an incorrect patch.
Stopping at the first viable edit would have preserved these working patches while halving execution overhead in systems like Laguna-XS.2. Instead, in up to 8 percent of instances, enterprise systems pay premium inference costs for an agent to overwrite its own successful work and return a defective build, directly undermining the unit economics of AI deployment.
Side by side
Cloud inference bills for coding agents swell not from the difficulty of the task, but from autonomous pipelines that simply cannot hit the brakes. While standard benchmarks evaluate only the final commit, Laguna-XS.2 and Qwen3-Coder produce working patches almost immediately, only to burn a median of up to 60% of their run checking and re-checking code they already fixed. Engineering budgets effectively subsidize expanding context windows and redundant API calls just so the model can second-guess its own work. Autonomous agents managed to solve repository bugs on their first edit, only to rack up compute bills proving they do not know when the job is done.