Termination Lag: Coding Agents Solve Early but Stop Late

Musa Cim, Burak Topcu and Mahmut Taylan Kandemir at Penn State record and test every distinct patch a coding agent produces during a run and measure termination lag, the steps between the first correct patch and the end of the run.
Ask this paper
Scope. Five models, two agent frameworks and three SWE-bench datasets (Verified, Multilingual and Pro), with every intermediate repository state tested.
Early solutions. In 38 to 82% of successful runs, the agent's first source-code edit is already correct.
Late stopping. Steps after the first correct patch make up a median of 35 to 37% of successful runs for Qwen3-Coder and 54 to 60% for Laguna-XS.2 on SWE-bench Verified and Multilingual. Most of those steps are verification and repository exploration.
Regressions. In 1 to 8% of cases, the extra work undoes the correct patch and the run ends with a wrong solution.
Implication. Stopping is a separate capability. Evaluations should record when correctness is reached and whether it is kept until the end, not only the final state.
Abstract
Coding agents can solve a task well before they stop working on it. We characterize \emph{termination lag}--the number of steps between an agent's first correct patch and the end of its run--across five models, two agent frameworks, and three SWE-bench datasets by recording and testing every distinct repository patch generated during execution. Our analysis reveals that 38--82% of successful runs achieve a correct solution on their initial source-code edit. However, agents continue to expend substantial effort after correct patches, with post-solution steps accounting for a median of 35--37% for Qwen3-Coder and 54--60% for Laguna-XS.2 in successful runs on SWE-bench Verified and Multilingual. Agents spend most of these additional steps verifying their work and exploring the repository. In a small fraction of cases (1--8%), this continued activity leads agents to undo their earlier correct patch, leaving the final solution incorrect.