Coding agents need a stop contract after an accepted patch
Termination Lag finds that successful coding agents often reach the right source edit well before they stop. Add an acceptance checkpoint, but do not confuse benchmark oracle tests with production certainty.

What happened
Researchers published Termination Lag, a study of post-solution work across five models, two agent frameworks and three SWE-bench datasets.
Why it matters
Extra agent activity after a viable patch consumes tokens and can reverse correct work, yet stopping too early can also leave tests, documentation or integration incomplete.
A correct edit may arrive before the stopping decision
The Termination Lag study analyses successful coding-agent trajectories from five models, two agent frameworks and three SWE-bench datasets. It replays intermediate repository states against the benchmark's oracle tests to locate the first point that would ultimately pass. Across the reported settings, 38–82% of successful runs were already correct after the initial source-code edit.
The remaining activity was material. Median post-solution work accounted for 35–37% of trajectory activity for Qwen3-Coder and 54–60% for Laguna-XS.2. In 1–8% of successful-run traces, later work undid a correct patch before the agent recovered or terminated. These are bounded benchmark results, not a forecast for every repository, model or harness.
The oracle matters. A production agent does not know the hidden tests or the earliest counterfactual point at which a patch would pass. Some actions after the first edit—running tests, checking call sites, updating a migration or documenting a risk—are necessary. The study therefore reveals a control problem rather than proving that agents should stop immediately after editing.
There is another limit: the benchmark is not ground truth for production quality. OpenAI's audit of SWE-bench Verified reported material test or problem issues in at least 59.4% of 138 audited tasks that frontier models missed, alongside contamination concerns. That audit does not refute termination lag, but it narrows what its percentages can establish.
Put acceptance between solution and continuation
Define a repository-specific checkpoint that can be reached after any coherent change, not only at the end of a long agent loop. The checkpoint should run scoped tests, static checks and an ownership review of changed interfaces. It should also list required follow-up work, so a passing patch is not mistaken for a complete release.
Log the first accepted state, every action after it, the reason for continuing and whether later changes improved or degraded acceptance. Compare that trace with the local acceptance gate, which already separates benchmark rank from merge evidence.
Decision rule
Stop autonomous modification when the patch passes the declared acceptance contract and no named follow-up remains. Reopen the loop only for a specific failed check or reviewer request; do not let an agent continue merely because its token budget remains.