Coding agents use generated tests to decide whether a proposed patch satisfies an issue's requirements. A suite that fails on the buggy program and passes after applying the reference patch can still accept an incorrect patch or reject a correct patch. We introduce SWEPATCHTEST, a test-generation benchmark with 619 tasks from SWE-bench Pro, SWE-bench Multilingual, and DeepSWE and 82,579 candidate patches collected from coding-agent trajectories. By replaying each suite on the buggy and patched codebases, \benchmark jointly measures issue reproduction, acceptance of correct patches, and rejection of incorrect patches. Joint Validation Rate (JVR), which requires all three criteria on the same task, exposes failures hidden by single-reference evaluation: the best-performing configuration achieves only 9.21% JVR despite reproducing the reference transition on 59.29% of tasks. We further use validation scores to select and scale demonstrations for supervised fine-tuning (SFT). The resulting training recipe approximately triples JVR and improves downstream repair across three SWE-bench benchmarks. Patch discrimination thus provides both a diagnostic measure of test quality and an execution-based signal for curating agent training data.
Figures & tables
Benchmark
F2P
Correct pool
Incorrect pool
Joint Validation
Tasks
Test scale
Multilingual
TestEval
✗
✗
✗
✗
210
Function
✗
TestGenEval
✗
✗
✓
✗
1,210
File
✗
CLOVER
✗
✗
✗
✗
845
Block/file
✗
MultiFileTest
✗
✗
✗
✗
60
Multi-file
3
SWT-Bench
✓
✗
✗
✗
1,983
Repo.
✗
TDD-Bench Verified
✓
✗
✗
✗
449
Repo.
✗
Table 1: Comparison of test-generation benchmarks.
Figure 1: Patch-discrimination profiles of coding-agent configurations on SWEPatchTest .
Figure 2: Overview of test generation, benchmark construction, and SFT in SWEPatchTest .
Model
Reference
Patch-level
Complete-task
GRR
WDR
CAR
F1
CT-WDR
CT-CAR
CT-F1
JVR
GPT-5.6-sol
59.29
88.57
50.20
64.08
47.66
28.59
35.74
9.21
Claude-Fable-5.1
65.11
83.74
62.19
71.37
34.89
30.37
32.47
7.92
Claude-Opus-5
68.17
85.91
66.76
75.13
32.47
31.34
31.89
7.11
Kimi-K3
33.12
80.24
40.64
53.95
49.43
22.94
31.34
5.98
Qwen3.8-max
49.60
84.69
61.68
71.38
32.47
30.21
31.30
5.17
Table 2: Patch-discrimination performance of representative coding agents on SWEPatchTest .
Figure 3: Patch-discrimination case study for Caddy’s default_bind option.
Configuration
SWEPatchTest
Verified
Multilingual
Pro
GRR
WDR
CAR
F1
CT-WDR
CT-CAR
CT-F1
JVR
AVG
Pass
AVG
Pass
AVG
Pass
SWE SFT
8.89
20.75
25.28
22.79
9.21
19.39
12.49
1.29
67.53
79.20
55.08
72.00
46.56
60.05
+ TestGen Supervision
39.26 +30.37
59.00 +38.25
43.98 +18.70
50.39 +27.60
13.73 +4.52
28.11 +8.72
18.45 +5.96
2.26 +0.97
69.47 +1.94
80.00 +0.80
62.05 +6.97
76.25 +4.25
48.97 +2.41
60.47 +0.42
+ Validation-guided TestGen
40.39 +31.50
64.37 +43.62
50.27 +24.99
56.45 +33.66
25.69 +16.48
31.50 +12.11
28.30 +15.81
3.23 +1.94
70.24 +2.71
80.60 +1.40
63.02 +7.94
76.33 +4.33
49.18 +2.62
60.68 +0.63
+ Scaled TestGen Supervision
41.20 +32.31
72.14 +51.39
51.62 +26.34
60.18 +37.39
31.34 +22.13
32.96 +13.57
32.13 +19.64
3.88 +2.59
71.84 +4.31
82.00 +2.80
63.30 +8.22
78.00 +6.00
50.70 +4.14
61.70 +1.65
Table 3: Test-generation and downstream repair performance across SFT configurations.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Source
Initial
Removed
Retained (%)
SWE-bench Pro
731
389
342 (46.8)
SWE-bench Multilingual
300
133
167 (55.7)
DeepSWE
113
3
110 (97.3)
Overall
1,144
525
619 (54.1)
Appendix
Table 4: Task-level curation by benchmark source.
Figure 4: Simplified system prompt for the task-curation judge.
The pass-all-test binary reward has become a standard recipe for training software engineering agents, but its sparsity eliminates difference of partially correct patches. The test pass-rate is a natural alternative. However, we find that it is not a reliable indicator of patch quality. A functionality being tested can be covered by either one challenging test or one hundred trivial tests, where the majority might be already satisfied pass-to-pass tests. We introduce CodeLift, a reinforcement learning method that dynamically calibrates pass-rate rewards, turning the test suite into an adaptive curriculum. At each iteration, CodeLift groups tests that kill the same patches and patches that pass the same tests, then gives more weight to test groups that fewer patch groups pass. This reduces the impact of majority simple tests and focuses more on what is still challenging. Within each rollout, CodeLift applies the same scoring rule to repository snapshots, assigning credit to useful actions even when later ones introduce regressions. Experiments on SWE benchmarks show that CodeLift consistently improves pass@1/2/4/8 over binary and pass-rate baselines. Analyses show that CodeLift provides dense, stable learning signals and unlocks the inherent curriculum in the test suite.
Junjielong Xu, Huachao Zhu, Alyssa Wu +2
School of Data Science, The Chinese University of Hong Kong, Shenzhen · Tencent
SWE-Bench Pro is a widely used benchmark of long-horizon software engineering tasks for coding agents. As agents improve, they reach task issues earlier agents never touched and interact with the evaluation environment in ways the original harness did not anticipate. We present SWE-Bench Pro V2, a revised public split built to keep the benchmark accurate as capabilities advance. Agentic audits, expert adjudication and blind re-implementation repaired or retired 480 of the 731 tasks: 23 contracted engineers spent 404 hours, each working in a language they write professionally, and every revised instruction was verified by a second engineer solving the task from the text alone. A hardened protocol restricts network access to the model endpoint and re-grades every patch in a clean container, so agents cannot retrieve upstream fixes or get credit for changes outside their patch. On the 642 V2 tasks frontier agents resolve up to 99.4% while other systems stay clearly separated, and a 51-task Hard split spreads systems from 52.9% to 98.0%. We release the benchmark and distill lessons for maintaining agent benchmarks over time.
Execution feedback can guide coding agents toward correct repository repairs, but only when the tests capture the behavior requested by the issue. Agent-generated tests can encode incomplete or incorrect behavioral targets; when the same trajectory writes both the patch and the test, their errors can agree and create false confidence. We introduce ExecCritic, combining a test--verify--revise scaffold with a role-specific reinforcement learning recipe for training agents within it. The scaffold separates test construction from source-code repair: a Test agent independently generates repository-native tests, a fail-closed harness qualifies and freezes them, and a Repair agent revises source code from their execution feedback without changing the tests. Both roles use Qwen-3.5-35B-A3B as the backbone and are trained separately. In Learn to Test, the Test agent learns to produce behaviorally valid tests that distinguish correct from incorrect patches. In Test to Improve, the Repair agent learns both direct task resolution and feedback-guided revision. On SWE-bench Verified, test quality determines whether feedback helps: holding the base Repair agent fixed, tests from the base Test agent reduce resolved rate from a no-test baseline of 61.2% to 57.3%, whereas tests from GPT-5.6-sol raise it to 65.3%. Role-specific post-training raises the Qwen Test agent's Base-to-Gold success from 22.2% to 62.2%; composing the two post-trained Qwen agents reaches 72.6%, an 11.4-point gain over the original no-test baseline without stronger-model or Oracle feedback at evaluation time. Code is publicly available at https://github.com/MSR-Orchard/execcritic.
Leitian Tao, Baolin Peng, Haorui Wang +7
University of Wisconsin–Madison · Microsoft Research · Georgia Tech