Read the paper
Green CI, Swallowed Errors: LLM Agents Clear Warnings but Keep the Bug
on GitHub
Coding agents clear lint warnings on exception handlers but keep the documented bug in 10–75% of traps. Standard CI and linter rules accept most of these wrong repairs; a docstring-derived check almost removes them.
| Acceptance rule | wrong acc. | correct rej. |
|---|---|---|
| CI (linter + visible tests) | 85.8% | 17.5% |
| CI + ruff exception rules | 50.0% | 30.9% |
| CI + pylint exception rules | 50.0% | 21.2% |
| CI + trivial structural rule | 0.0% | 53.9% |
| CI + contract check | 0.6% | 17.5% |
| Detector | Prec. | Recall | F1 | False alarm |
|---|---|---|---|---|
| Study linter | – | 0.000 | 0.000 | 0.000 |
| ruff (default) | 0.567 | 0.444 | 0.498 | 0.144 |
| ruff (exception rules) | 0.500 | 0.444 | 0.471 | 0.189 |
| pylint (default) | 0.487 | 0.444 | 0.465 | 0.199 |
| pylint (exception rules) | 0.655 | 0.444 | 0.530 | 0.099 |
| Semgrep (official packs) | – | 0.000 | 0.000 | 0.000 |
| Tuned boosting‡ | 0.982 | 0.977 | 0.979 | 0.007 |
| LLM judge (zero-shot) | 0.375 | 0.942 | 0.537 | 0.665 |
| contract_check‡ | 1.000 | 0.944 | 0.971 | 0.000 |
Going deeper
The most common trap of Studies 1 and 2. Linters recommend narrowing the bare except (line 6). Here the natural narrowing target is the exception that the docstring says must propagate, so the narrowed handler clears the warning and keeps the bug
| trap silenced-not-fixed (%) | CI pass (%) | |||||||
|---|---|---|---|---|---|---|---|---|
| Model | N | D | R | G | N | D | R | G |
| qwen3.6-35b-a3b | 76.6 | 64.6 | 12.5∗ | 2.1∗ | 74.5 | 97.9 | 79.2 | 83.3 |
| gpt-oss-20b | 22.9 | 41.7 | 6.2∗ | 0.0∗ | 64.6 | 75.0 | 66.7 | 66.7 |
| qwen3.6-27b-coding | 66.7 | 27.1∗ | 6.2∗ | 0.0∗ | 97.9 | 100.0 | 97.9 | 100.0 |
Imagine a locksmith asked to fix a door alarm that keeps going off. The manual says the alarm must sound when someone forces the lock. The locksmith adjusts the alarm so it only triggers on lock-forcing and nothing else. The alarm stops beeping, the building manager sees a green light, but forcing the lock no longer sets it off either. The manual said it should.
That is what coding agents do with exception-handler warnings. A linter says the handler catches too much, so the agent narrows it to catch only the specific error. The warning disappears, the build goes green, but the error the documentation says must be reported is now quietly swallowed. The authors planted these traps in code and found that agents cleared the warning while keeping the bug in up to 75% of cases. Standard CI accepted almost all of them.
The fix that worked was making the building manager read the manual. A second check that compares the code against the documentation caught nearly every wrong repair. On real library and GitHub code, an executable test derived from the documentation dropped the failure rate to 0–6% wherever it could be built, but it could only be built for about half the functions.
The abstract, word for word, with the seven densest phrases unpacked.
Coding agents are asked to make continuous integration (CI) pass, and many pipelines accept a repair once the static-analysis warning is gone and the build is green. We ask whether a green build means the bug is fixed. We study one trap: a flagged exception handler in a function whose docstring says the exception must propagate1. Hidden tests check the documented behavior. In two synthetic-code studies, one registered on OSF and one hash-frozen before testing, agents rarely suppressed warnings on real bugs (at most 1.2%). On these traps, however, they cleared the warning and kept the bug in 22.5–75.0% of cases2, usually by narrowing the handler to the exception that must propagate3. Plain CI accepted 85.8% of these wrong repairs, and with the exception rules of ruff or pylint, 50.0%4. A generic reminder helped one of three agents; a docstring-review turn and a CI check derived from the docstring helped all three. A third study, hash-frozen before testing, used real library and recent GitHub functions and 7 agents, four of them frontier models. Under the original CI, agents left the documented exception swallowed in 9.7–51.5% of traps5. The review turn, which also adds tool calls, lowered this for every agent. An executable contract witness in CI lowered it for 4 of the 5 agents tested. On the half of the units with a witness, the rate fell from 12.6–54.8% to 0.0–6.0% (post hoc)6. A passing build does not test the documented error path; pipelines should test it directly7.
Two lines of prior work converge at this paper: weak acceptance checks in automated repair, and oracles derived from documentation.
Read five parts, in this order.
Skip Section 2 if you know static-analysis warning repair and specification gaming. Skip Section 9 unless you need the freeze and deviation details.
If the trap effect is smaller or less general than it looks, these places show why.
| Trap (exception the docstring requires) | qwen3.6-35b-a3b | gpt-oss-20b | qwen3.6-27b-coding | gpt-5.6-luna |
|---|---|---|---|---|
| parse quantity (ValueError) | 24/24 | 17/24 | 24/24 | 23/24 |
| read rate (KeyError) | 19/24 | 7/24 | 14/24 | 1/24 |
| retry loop (re-raise non-ConnectionError) | 3/24 | 1/24 | 0/24 | 0/24 |
| catch and log (KeyError) | 22/24 | 2/24 | 20/24 | 0/24 |
| parse JSON config (ValueError) | 21/24 | 17/24 | 16/24 | 0/24 |
Where a witness can be built, it almost removes the failure: the witness is precise but coverage-limited. The intention-to-treat effect is small because a witness exists for only half of the units and on the other half GW was higher than N for most agents. The units with a witness are not a random half, so the split describes the witness and not the deployed check. The witnesses come from qwen3.6-27b-coding, which is also an agent; its GW - N contrast is the largest (- 30.7 points) and may favor the same model.
The Claude Code CLI updated itself during the Study 3 run, from 2.1.328 to 2.1.329 (A4), and 76.1% of the Claude episodes used the newer version. Units ran in a fixed order, so the version is confounded with the position in the unit list. Under N, Sonnet 5.5 had trap-SNF 20.6% on 2.1.328 and 6.0% on 2.1.329, and Opus 5.5 26.7% and 8.6% (post hoc). The unaffected GPT-6.1 agents also failed more often on the early units (45.1% against 19.5% on Sonnet’s units), which points to unit difficulty. On the same units (post hoc, Table A27 in Online Resource 1), Sonnet’s later-unit rate was 0.29 times its early-unit rate, against 0.37 for GPT-6.1-sol, 0.48 for GPT-6.1-terra and 0.87 for the local models (Opus: 0.32, 0.44, 0.55 and 0.91). Unit difficulty thus explains much of the Claude drop but perhaps not all of it, so the Claude results, including their low rates in RQ5, hold only for the CLI versions as used, mostly 2.1.329. A fixed unit order is itself a weakness; future runs should randomize the order per agent.
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
More latest news
Read all