Termination Lag's grader reverses fixes in patches that carry a compiled file: five of its "lost fixes" were intact
At step 199 of 200, Laguna-XS.2 tidied up after itself. It had fixed @ExtensionMethod on records in Lombok (SWE-bench Multilingual task projectlombok__lombok-3479), compiled a scratch test with javac, run it, and then deleted ExtensionMethodOnRecordTest.java and ExtensionMethodOnRecordTest.class. It missed the second file javac had written for the test's inner class, ExtensionMethodOnRecordTest$Extensions.class. That file stayed in the submitted patch, and the run went into the "Termination Lag" results as an agent that had a passing fix and lost it.
The fix was not lost. The source edits in the final patch are identical to those in the snapshot from step 196, which the grader marked as passing. What changed the grade is how the paper's grading script applies a patch that contains a compiled file.
When we checked the paper on November 17, Musa Cim, Burak Topcu and Mahmut Taylan Kandemir's "Termination Lag: Coding Agents Solve Early but Stop Late" (arXiv:2611.14960) had released per-step grades but not the trajectories: the Hugging Face dataset musacim/termination-lag-trajectories answered 401. It has since been opened. It holds 2,400 runs in six settings with open models, every step's patch and every distinct patch's grade. We went through the runs that reached a passing patch and ended on a failing one, which is how we got to the grader.
Three attempts, no reset
The grader is code/grading/grade_sif.py in the musacim/termination-lag repository. Its docstring says it grades "with the official SWE-bench evaluation". It tries three commands in turn and stops at the first that succeeds:
APPLY = ["git apply --verbose", "git apply --verbose --reject", "patch --batch --fuzz=5 -p1 -i"]
Nothing restores the repository between attempts. That matters when the patch contains a compiled file. The recorder builds each snapshot with git diff without --binary, so a .class file appears as a single line, Binary files /dev/null and b/X.class differ, with no content. Then:
git applyrefuses the whole patch ("cannot apply binary patch ... without full index line").git apply --rejectapplies every text hunk, including the actual fix, and still exits with an error because of the binary file.patch --batchfinds the fix already in place. In batch mode GNU patch assumes such a patch was meant to be reversed, so it reverses it, and exits successfully.
The grader logs the patch as applied and runs the tests against the original code. We ran the same three commands, in the same order, against Lombok at the task's base commit 8e55a95. The snapshot from step 196 applied with the first command. The final patch went through to the third, which printed "Reversed (or previously applied) patch detected! Assuming -R." twice and left no changes in src/. Had the third command failed instead, the grader would have recorded the patch as not applied. Either way, the tests never see the fix.
SWE-bench's own harness used the same three commands, with the same lack of cleanup, in v4.1.0 from September 2025. Version 5.0.0, from August 2026, resets the tree after each failed attempt. The code comment reads: "a failed attempt (notably --reject) leaves partial state behind, which makes every later command fail; restart from a pristine tree". It also runs patch with --forward, which skips patches that look already applied instead of reversing them. Termination Lag's grader follows the older sequence.
Where it shows up in the data
Of the dataset's stored patches, 2,310 contain at least one binary file. Six of them are graded as passing, which we can't explain from the patches. Most, 1,749, come from the two SWE-bench Multilingual settings, where agents build Java, Go and C++ projects and the compiler output lands in the repository: javac class files, a caddy binary from go build, test executables from g++.
Lost fixes. The six public settings have 50 runs that reached a passing patch and ended on a failing one, 40 of them by the agent's own decision. In 5 of those 40, the final patch makes exactly the same edits to existing files as the last passing snapshot and adds compiled files: apache__lucene-13170 and projectlombok__lombok-3479 for Laguna-XS.2, and apache__lucene-12626, caddyserver__caddy-6370 and projectlombok__lombok-3042 for Qwen3-Coder-30B-A3B. Two more, facebook__docusaurus-10130 and valkey-io__valkey-928, also keep their source edits but contain no binary files, so the patch doesn't explain the failing grade there. The README notes that a test run that times out counts as a failure.
The paper's description of agents undoing their own fix does hold elsewhere. Under mini-SWE-agent, 10 of Qwen3-Coder's 11 voluntary lost-fix runs broke at a step where the agent copied a .backup or .bak file over its edited source, or ran git checkout on it, and never put the change back.
Temporary regressions. In Laguna-XS.2's Multilingual runs, 131 steps turn a passing patch into a failing one. In 38 of them, spread over 12 runs, the edits to existing files are unchanged and the only new content is compiled output. Seven of those 12 runs ended resolved. Our November post repeated the authors' action file, which records a passing patch failing and then recovering in 48 of 143 analysed successful Laguna-XS.2 Multilingual runs. Some of those recoveries are a compiled file appearing in the repository and then being deleted.
Late first fixes. In 7 of the 144 resolved Laguna-XS.2 Multilingual runs, the step the dataset records as the first correct one came after steps with the same source edits plus a binary file. The median gap is 26 steps. One Laguna-XS.2 Verified run shows the same pattern, with a 59-step gap. In those runs the measured termination lag is shorter than the agent's actual delay.
Unsolved tasks. The largest possible effect is on tasks that never passed. Qwen3-Coder's final patch contains a binary file in 62 of its 300 Multilingual tasks; the dataset marks 67 of those 300 as resolved. Laguna-XS.2 has 30 such tasks on Multilingual. Under this grader, a failing grade on those patches says nothing about whether the fix worked. We couldn't regrade them, which needs the Multilingual task containers, so 62 is an upper bound on mis-graded tasks, not a corrected score.
What it changes
The headline numbers are mostly safe. Termination lag is measured on runs whose final patch passed, and those rarely contain binaries. In the Verified and Pro settings we found no lost fix or temporary regression explained by a binary file. What needs revisiting is the Multilingual part of the paper: the solve rates, the count of runs that lost a fix and the regression counts. In SWE-bench terms, an agent that compiles a test inside the repository and leaves one stray .class file behind was graded as if it had written nothing.
An agent benchmark scores the model together with everything around it, down to the line that applies the patch. The remedies here are simple. Reset the tree between attempts, add --forward, or drop binary sections before grading. As of December 1 nobody has raised the issue on the repository, and the paper is still at v1.
- musacim/termination-lag-trajectories (Hugging Face dataset)
- termination-lag: code/grading/grade_sif.py
- termination-lag: code/recording/stepproxy.py
- SWE-bench v5.0.0: swebench/harness/run_evaluation.py
- SWE-bench v4.1.0: swebench/harness/run_evaluation.py
- termination-lag issue #1: Table 1 context growth (author reply on trajectories)
Comments
No comments yet. Be the first.