What Makes Good Data for Training Coding Agents? A Systematic Study on SWE-Gym
Organizations: AMD · University of Michigan · Tulane University · Georgia Institute of Technology ·
Abstract
Reinforcement learning (RL) trains coding agents on software tasks whose hidden tests decide the reward, yet task collections check these tests only against the reference fix. We ask what makes a task good training data, focusing on the correctness of its reward labels. We audit SWE-Gym with two LLM families, and a suspected error counts only if execution reproduces it. We find that unsolved often means mislabelled: 74% of the tasks that a 9B base model never solves have a test that rejects correct fixes (a false negative), versus 20% of those it sometimes solves. We repair or remove such tasks, and the audited tasks that remain train better policies. At equal size and matched difficulty, models trained on them score 2.4 and 2.7 points higher on held-out tasks from SWE-bench Verified and SWE-bench Pro than models trained on the original tasks, whereas simply dropping the never-solved tasks shows no such gain. We further find that wrong patches that pass (false positives) make up about a quarter of all passing patches, and that new tests that catch a quarter of them do not change held-out scores detectably. A pass rate shows whether a task yields reward, not whether that reward is right, so the reward labels themselves must be checked. To this end, we release SWE-Gym-Verified with its 1,087 audited tasks, every verdict with its executed evidence, our training sets, and the full audit pipeline.
Figures & tables
| Check | Items | Result |
| Claude and GPT flag the same tasks | 2,001 | 0.80 |
| Both humans: flagged assertion open | 45 | 33 |
| never / sometimes solved | 8 / 37 | 8 / 25 |
| Each human: unflagged control open | 30 | 3, 1 |
| Each human: false positive incorrect | 15 | 10, 12 |
| FN verdict, PAIChecker-marked tasks | 726 | 82% |
| Training set | Verified-397 | SWE-bench Pro | Gain |
|---|---|---|---|
| Base model | 57.2 | 53.8 | – |
| Orig | 60.2 2.1 | 53.5 2.1 | 1.4 0.9 |
| Orig+Filter | 61.3 2.1 | 51.4 3.0 | 0.9 2.5 |
| Clean | 62.6 1.1 | 56.2 1.3 | 3.9 1.2 |
| Clean+FP | 62.6 1.0 | 57.3 3.7 | 4.5 2.2 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Step | Models | Interface |
|---|---|---|
| Screen for empty or link-only statements; defective-PR check of unlabelled tasks | Claude Opus 5.5 | API |
| Solution-in-issue and misleading-statement screens | both | API |
| FN rating of every F2P assertion | both | API |
| Witness, cross-review, debate | both | agent |
| Judgment of a P2P test that rejects a patch passing all F2P tests | both | API |
| Judgment whether a statement change can repair a task | both | agent |
| Never solved | Sometimes solved | |
|---|---|---|
| FN-flawed, Orig (§ 5.2 ) | 74.0 | 19.5 |
| counting repaired tasks as flawed | 83.1 | 28.0 |
| counting only verdicts confirmed by both families | 67.5 | 12.9 |
| tasks with one F2P test | 61.5 | 12.3 |
| tasks with two or three F2P tests | 77.8 | 24.4 |
| tasks with four or more F2P tests | 83.3 | 31.8 |
| Tier | Tasks |
|---|---|
| Confirmed by full escalation (witnesses, cross-review, debate) | 85 |
| Witness mode: both families’ witnesses fail a common F2P test | 810 |
| Other confirmed | 68 |
| Contested (one family) | 128 |
| Total with an FN verdict | 1,091 |
| Clean | Orig | Orig+Filter | SWE-Gym-Verified (trainable) | |
| Tasks (never / sometimes solved) | 77 / 435 | 77 / 435 | 0 / 512 | 138 / 570 |
| Repaired statements | 42 (8.2%) | 0 | 0 | 20.9% |
| Mean base pass rate | 49.8% | 48.3% | 56.8% | |
| Median statement length (chars) / F2P tests | 2,353 / 1 | 2,040 / 2 | ||
| Repository mix, Clean vs. Orig (TV distance) | 5.3% | |||
| Training reward (%) | 57.8 0.7 | 52.1 2.0 | 60.6 1.8 | |
| Base model | Qwen3.5-9B |
| Scaffold | SWE-agent |
| Episode budget | 80 tool calls, 128K context, temperature 1.0 |
| RL algorithm | GRPO with the Dr. GRPO loss ( Liu et al., 2025 ) ; KL penalty to the base model, coefficient |
| Optimization | Adam, learning rate (constant after 5 warm-up steps), weight decay 0.01, |
| gradient-norm clip 1.0; 16 tasks 8 samples per step, 80 steps | |
| Seeds | seeds 1–3 for every set; Clean+FP seed uses the data order of Clean seed |
| Run | ckpt (dev-100) | Verified-397 | Verified-397 | Pro | Pro |
|---|---|---|---|---|---|
| Base | – (46.8%) | 57.2% | – | 53.8% | – |
| Clean s1 | 70 (57.5%) | 63.8% | 6.6 | 57.4% | 3.6 |
| Clean s2 | 60 (52.5%) | 61.7% | 4.5 | 54.8% | 1.0 |
| Clean s3 | 70 (54.5%) | 62.3% | 5.2 | 56.5% | 2.7 |
| Orig s1 | 20 (52.2%) | 60.1% | 3.0 | 51.6% | 2.1 |
| Orig s2 | 30 (55.8%) | 62.3% | 5.1 | 53.2% | 0.5 |
| Term | Meaning | Defined in |
|---|---|---|
| F2P / P2P tests | tests that must start passing / keep passing | § 3 |
| Pass count | passes in 8 base-model samples: never ( ), sometimes ( – ), always ( ) solved | § 3 |
| FN / FP | correct patch rejected / wrong patch accepted | § 3 |
| Family | Claude Opus 5.5 with Claude Code, or GPT-6.1 Sol with Codex CLI. GPT-5.6 Sol also counts as GPT | § 4 |
| Flagged assertion | an F2P assertion that a family judges may reject a correct patch | § 4.1 |
| Witness | a patch that follows the statement but differs from the gold patch in the flagged detail | § 4.1 |
RL Benchmarks
Reinforcement learning benchmarks provide tasks and evaluation protocols for comparing agents across control, games, robotics, and other decision-making settings.
See all 92 papers