Coding Agents Solve Tasks Early but Terminate Late

Research 0 views

Coding agents often find correct patches early but spend 35-60% of steps verifying, causing termination lag and occasional failures.

Key Takeaways

  • Coding agents often find correct patches early, with 38–82% of successful runs reaching a correct solution after the first source-code edit.
  • After a correct patch appears, a median 35–60% of steps still occur, mostly for verification and exploration, creating termination lag and extra computation.
  • Continuing after success can sometimes harm results: in 1–8% of cases, agents break an already-correct patch and finish incorrectly.
  • Better stopping rules could protect correctness, reduce wasted steps, and address the open question of when a solution is good enough to submit.

Meta description: A study of 5 LLMs, 2 agent frameworks, and 3 SWE-bench datasets shows coding agents often reach correct patches early, then spend 35–60% of steps.

Tags: coding agents, SWE-bench, LLM agents, termination, software engineering

Featured image: Abstract technology style image showing code patches, stop markers, and evaluation trajectories; no real people, no company logos, no text.

Agents often reach correct patches early, then keep running.

Background: Why the First Patch Can Be the Best Patch

Agents edit code, run checks, read outputs, and revise patches until solved. Benchmarks evaluate final patches, so runs can look clean even after most time follows a correct solution. Recognizing when a fix exists is key; without a stopping signal, agents keep consuming steps.

Development: Tracking 5 LLMs, 2 Agent Frameworks, and 3 SWE-bench Datasets

The study tracked intermediate patches during execution, not only at the end. Across settings, 38–82% of correct-patch runs get it right on the first source-code edit. This early edit is the central time marker: the decisive event often precedes verification. The first edit is not always final, but often the correct answer first appears.

Latest Progress: Post-Solution Steps, Verification, and Rare Failures

After a correct patch appears, a median 35–60% of steps in successful core settings occur afterward. Extra steps mostly verify and explore, adding computation and a small chance of damaging the patch; this creates termination lag: the gap between solving and stopping.

In 1–8% of cases, agents break an already-correct solution and finish incorrect, turning solved tasks unsolved. Stopping rules protect correctness and reduce cost. Recognizing when to stop could significantly reduce unnecessary computation.

Artifacts: GitHub; Hugging Face dataset. Open question: when a solution is good enough to submit. Next signal: whether explicit stopping criteria reduce post-solution steps without lowering correct-patch share.

Tags: coding agentsLLM agentssoftware engineeringSWE-benchtermination

Comments

No comments yet. Be the first to comment.

Leave a comment