Anyone who has watched a coding agent work has seen it: the fix looks done, the tests pass, and the agent keeps going. It reads more files, reruns things, tidies up. A paper posted to arXiv on 11 November puts numbers on that habit. Its title sums it up: “Termination Lag: Coding Agents Solve Early but Stop Late”.
It is a narrow academic study, not a product launch. But it speaks to two things every team running agents cares about: what those runs cost, and whether the final result is the right one.
What the researchers measured
The authors, Musa Cim, Burak Topcu and Mahmut Taylan Kandemir, define “termination lag” as the number of steps between an agent's first correct patch and the end of its run. To measure it, they recorded every distinct patch an agent produced during a run and tested each one, rather than only testing the final answer.
The study covers five models and two agent frameworks on SWE-bench tasks, the benchmark built from real GitHub issues. The models named on the abstract page, Qwen3-Coder and Laguna-XS.2, are open-weight models, not the frontier models most teams use day to day. That matters when reading the numbers.
What they found
- Agents often get it right first time. In 38% to 82% of successful runs, the agent's first edit to the source code was already a correct solution.
- Then they keep working. Steps taken after the problem was already solved made 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 that time goes to checking and looking around. The extra steps were mainly verification and exploring the repository.
- Sometimes the extra work breaks the fix. In 1% to 8% of cases, later activity undid the earlier correct patch, so the final answer was wrong even though the agent had been right along the way.
A summary in the Sam on AI brief reaches the same reading: agents frequently reach a correct patch well before they stop, and later edits occasionally turn it into an incorrect one.
How much to read into it
Some caution is in order. These are open-weight models on a benchmark, and stronger models with better harnesses may stop sooner. Some of the extra checking is also worth doing: an agent that verifies its fix before declaring victory is often what you want. The paper does not say all post-solution work is waste.
Still, two points carry over to any team. First, if a third or more of a run happens after the job is done, that is a third or more of the cost and the wait. Second, an agent's final state is not always its best state. If you only look at the end of a run, you can miss that it had the right answer earlier.
What to change on your team
- Give every task a clear finish line. “Fix the bug” is open-ended. “Make this failing test pass without breaking the others, then stop” is not. A concrete, checkable done condition is the simplest way to cut termination lag.
- Start from a failing test where you can. Ask the agent to write a test that reproduces the problem first. Then “done” means that test passes, and you have a regression test as a bonus.
- Checkpoint when the tests go green. Have the agent commit, or at least save a patch, the moment the checks pass. If later steps break something, the good version is one command away. Many agent tools already offer checkpoints or rewind; make using them a habit.
- Look at the history, not just the end. When an agent's final change fails review, check whether an earlier commit in the same run was correct. In the paper, that was the case in 1% to 8% of runs.
- Cap long runs. For unattended work, set a maximum number of turns or a time limit. A run that is still going long after the tests passed is a sign the task had no clear end.
- Match effort to the task. Small fixes rarely need the highest effort setting. Lower effort can mean fewer steps, and this paper suggests many of the extra steps weren't changing the answer.
The takeaway
Coding agents are often better at finding the fix than at knowing when they have found it. That gap costs time and money, and occasionally it costs the fix itself. The remedy is mostly on our side: tell the agent exactly what “done” looks like, make it checkable, and save the good state as soon as it appears.
Sources: Cim, Topcu and Kandemir, “Termination Lag: Coding Agents Solve Early but Stop Late”, arXiv:2611.14960 (11 November 2026), Sam on AI, AI Brief (13 November 2026).