{
  "id": "termination-lag",
  "code": "PTL-0276",
  "term": "Termination Lag",
  "aliases": [
    "TL",
    "coding agent termination lag"
  ],
  "category": "failure-modes",
  "definition": "Termination lag is the number of steps a coding agent takes after it first produces a correct patch, before it ends its run; the steps are mostly spent verifying and exploring rather than changing the solution.",
  "description": "Cim, Topcu and Kandemir of Penn State named the measure in a November 2026 paper, alongside time to first correct patch (TTFCP), the number of steps until a patch first passes the benchmark's tests; formally, termination lag is the agent's final step minus its first correct-patch step. They recorded and tested every intermediate patch for five models in OpenHands and mini-SWE-agent on SWE-bench Verified, SWE-bench Multilingual and SWE-bench Pro. Across their settings, 38 to 82% of runs that reached a correct patch were already correct at their first source-code edit, and a median of 35 to 60% of steps came after the first correct patch, mostly verification (48 to 63% of those steps) and exploration (15 to 29%). The correct patch survived to the end in 61 to 96% of runs, while 1 to 8% of runs broke it and ended with an incorrect patch. The authors propose no stopping rule; stopping at the first correct patch is an oracle upper bound, and a practical rule would have to decide when to submit from evidence available during the run. Each task was run once. Termination lag concerns agent steps, whereas overthinking describes excess reasoning tokens within a single response.",
  "example": null,
  "broader": [],
  "narrower": [],
  "related": [
    "coding-agent",
    "overthinking",
    "swe-bench",
    "harness-engineering",
    "evals"
  ],
  "introduced": 2026,
  "added": "2026-12-01",
  "sources": [
    {
      "title": "Termination Lag: Coding Agents Solve Early but Stop Late",
      "authors": "Cim, Topcu and Kandemir",
      "year": 2026,
      "url": "https://arxiv.org/abs/2611.14960"
    }
  ],
  "url": "https://protologue.com/t/termination-lag/",
  "citation": "Protologue. (2026). Termination Lag. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.9.2, PTL-0276). https://protologue.com/t/termination-lag/"
}