SWE-Duel: Towards a Self-Scaling Arena for Coding Agents
Organizations: School of Computing and Information Systems Singapore Management University
Abstract
Static coding benchmarks are fixed at release. Over time their tasks leak into training data, and stronger agents eventually saturate them. We argue that a benchmark should instead aim to be self-scaling: its tasks and oracles are created at evaluation time, so no content exists in advance to leak, and its difficulty is set by the participating agents rather than fixed at release. We introduce SWE-Duel, an arena in which two coding agents evaluate each other over mirrored Red-Blue turns. In each turn, the Red agent works on a real repository across three context-isolated sessions. It proposes and implements a new feature with feature tests, then embeds a subtle bug in that feature along with sealed bug-triggering tests. The resulting pull request is admitted only if (1) it passes the feature tests and the repository's existing tests while failing exactly the bug tests, and (2) a fresh session of the same agent can repair the bug blind, which rules out unsolvable tasks. The Blue agent then reviews the pull request without being told a bug exists. It wins only if its revision passes all three test suites, and then the two agents swap roles. We run a tournament among 11 model-harness participants on 15 repositories in five languages for 1,500 turns. The leaders win in different ways. GPT-5.5 with Codex CLI ranks first as the strongest solver, repairing 98.3% of the defects it reviews. Claude Opus 4.8 with mini-swe-agent ranks second as the strongest task author, with a 27.3% Red win rate. Finally, within one model family, tasks written by the newest version defeat a fixed-reference solver far more often than those of older versions (42.9% vs. 4.0%), giving preliminary evidence that task difficulty scales with task authoring capability.
Figures & tables
| Competitor | Matches played | Won | Drawn | Lost | Red win (%) | Blue win (%) | Bradley–Terry |
|---|---|---|---|---|---|---|---|
| GPT-5.5 [codex] | 10 | 8 | 1 | 1 | 11.3 | 98.7 | +2.82 |
| Claude Opus 4.8 [mini-swe-agent] | 10 | 8 | 0 | 2 | 27.3 | 88.7 | +2.46 |
| GPT-5.5 [mini-swe-agent] | 9 | 5 | 3 | 1 | 10.4 | 97.0 | +2.13 |
| Kimi-K2.7-Code [mini-swe-agent] | 9 | 5 | 2 | 2 | 15.6 | 90.4 | +1.82 |
| DeepSeek-V4-Pro [mini-swe-agent] | 9 | 5 | 1 | 3 | 18.5 | 91.9 | +1.50 |
| GLM-5.2 [mini-swe-agent] | 9 | 4 | 2 | 3 | 14.8 | 89.6 | +1.19 |
| Participant | tasks | Endog. Red wins | Endog. rate | Ref. Red wins/ | Ref. rate (95% Wilson) |
|---|---|---|---|---|---|
| Claude Opus 4.8 [mini-swe-agent] | 15 | 41/150 | 27.3% | 4/15 | 26.7% |
| DeepSeek-V4-Pro [mini-swe-agent] | 15 | 25/135 | 18.5% | 3/15 | 20.0% |
| Qwen3.7-Max [mini-swe-agent] | 15 | 18/135 | 13.3% | 3/15 | 20.0% |
| Nemotron-3-Ultra [mini-swe-agent] | 7 | 10/70 | 14.3% | 1/7 | 14.3% |
| GLM-5.2 [mini-swe-agent] | 13 | 20/117 | 17.1% | 1/13 | 7.7% |
| GPT-5.5 [Codex CLI] | 13 | 17/130 | 13.1% | 1/13 | 7.7% |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Repository | Commit | Language | SLoC | Tests | Time (s) |
|---|---|---|---|---|---|
| Flask | 7fff56f5172c | Python | 13,751 | 480 | 3.7 |
| Jinja | 15206881c006 | Python | 18,903 | 909 | 4.2 |
| SQLAlchemy | 5237d923ddb0 | Python | 511,172 | 18,020 | 161.8 |
| chi | 3b171578ca44 | Go | 9,923 | 254 | 36.1 |
| golang-jwt/jwt | 7ceae619e739 | Go | 5,503 | 201 | 5.6 |
| gorilla/csrf | 9dd6af1f6d30 | Go | 2,760 | 50 | 3.9 |
| Model | OpenRouter model ID | First access | Last access |
|---|---|---|---|
| GPT-5.5 | openai/gpt-5.5 | 2026-06-18 | 2026-08-29 |
| Claude Opus 4.8 | anthropic/claude-opus-4.8 | 2026-06-18 | 2026-08-29 |
| Kimi K2.7 Code | moonshotai/kimi-k2.7-code | 2026-06-18 | 2026-08-29 |
| DeepSeek V4 Pro | deepseek/deepseek-v4-pro | 2026-06-18 | 2026-09-19 |
| GLM 5.1 | z-ai/glm-5.1 | 2026-09-18 | 2026-09-18 |
| GLM 5.2 | z-ai/glm-5.2 | 2026-06-18 | 2026-08-30 |
| Participant | 3/3 | 2/3 | 1/3 | 0/3 | Repairs/runs | Rate (95% Wilson) | |
|---|---|---|---|---|---|---|---|
| DeepSeek-V4-Pro [mini-swe-agent] | 4 | 4 | – | – | – | 12/12 | 100.0% |
| Kimi-K2.7-Code [mini-swe-agent] | 4 | 4 | – | – | – | 12/12 | 100.0% |
| GPT-5.5 [Codex CLI] | 4 | 4 | – | – | – | 12/12 | 100.0% |
| GPT-5.5 [mini-swe-agent] | 4 | 4 | – | – | – | 12/12 | 100.0% |
| Claude Opus 4.8 [Claude Code] | 4 | 3 | 1 | – | – | 11/12 | 91.7% |
| Gemini-3.1-Pro [mini-swe-agent] | 4 | 3 | 1 | – | – | 11/12 | 91.7% |
| Full rank | Competitor | Solving BT | 95% CI | Solving success | Admitted / scheduled slots | Coverage |
|---|---|---|---|---|---|---|
| 1 | GPT-5.5 [codex] | +2.19 | 98.3% | 13 / 15 | 86.7% | |
| 2 | Claude Opus 4.8 [mini-swe-agent] | -0.32 | 85.7% | 15 / 15 | 100.0% | |
| 3 | GPT-5.5 [mini-swe-agent] | +1.45 | 96.4% | 13 / 15 | 86.7% | |
| 4 | Kimi-K2.7-Code [mini-swe-agent] | +0.09 | 88.3% | 13 / 15 | 86.7% | |
| 5 | DeepSeek-V4-Pro [mini-swe-agent] | +0.25 | 89.9% | 15 / 15 | 100.0% | |
| 6 | GLM-5.2 [mini-swe-agent] | +0.01 | 87.4% | 13 / 15 | 86.7% |
| Competitor | Full-schedule turn BT (95% CI) | Full-schedule 95% rank interval | Contested-only turn BT (95% CI) | Contested-only 95% rank interval |
|---|---|---|---|---|
| Claude Opus 4.8 [mini-swe-agent] | 1–8 | 1–10 | ||
| DeepSeek-V4-Pro [mini-swe-agent] | 1–8 | 1–10 | ||
| GPT-5.5 [mini-swe-agent] | 1–9 | 1–9 | ||
| GPT-5.5 [codex] | 1–9 | 1–9 | ||
| Kimi-K2.7-Code [mini-swe-agent] | 1–9 | 1–10 | ||
| Qwen3.7-Max [mini-swe-agent] | 1–9 | 1–10 |
| Harness | W | D | L | Score | Rate (95% CI) | Red win | Blue win | BT (95% CI) |
|---|---|---|---|---|---|---|---|---|
| mini-swe-agent | 4 | 1 | 1 | 93/180 | 0.13 | 0.90 | ||
| Codex CLI | 2 | 1 | 3 | 90/180 | 0.11 | 0.89 | ||
| Claude Code | 1 | 2 | 3 | 87/180 | 0.09 | 0.88 |
| Harness A | Harness B | A score | B score | Margin (95% CI) | Models |
|---|---|---|---|---|---|
| Claude Code | Codex CLI | 46 | 44 | 3 | |
| Codex CLI | mini-swe-agent | 46 | 44 | 3 | |
| Claude Code | mini-swe-agent | 41 | 49 | 3 |
| Competitor | Gen $ | Val $ | Eval $ | Total $ |
|---|---|---|---|---|
| GPT-5.5 [codex] | 149.56 | 47.54 | 444.79 | 641.89 |
| GPT-5.5 [mini-swe-agent] | 48.38 | 17.15 | 181.65 | 247.18 |
| Claude Opus 4.8 [mini-swe-agent] | 44.93 | 22.12 | 156.54 | 223.59 |
| Gemini-3.1-Pro [mini-swe-agent] | 106.18 | 19.77 | 61.81 | 187.76 |
| Claude Opus 4.8 [claude-code] | 42.31 | 14.04 | 122.70 | 179.05 |
| Nemotron-3-Ultra [mini-swe-agent] | 84.66 | 2.85 | 83.82 | 171.34 |
| Competitor | Turns | Success | Output M | Median k | [95% CI] |
|---|---|---|---|---|---|
| Claude Opus 4.8 [mini-swe-agent] | 119 | 0.857 | 0.75 | 5.9 | |
| Claude Opus 4.8 [claude-code] | 118 | 0.839 | 0.80 | 6.9 | |
| GPT-5.5 [mini-swe-agent] | 111 | 0.964 | 0.84 | 7.3 | |
| GPT-5.5 [codex] | 120 | 0.983 | 0.81 | 6.1 | |
| DeepSeek-V4-Pro [mini-swe-agent] | 109 | 0.899 | 1.15 | 10.1 | |
| GLM-5.2 [mini-swe-agent] | 111 | 0.874 | 0.78 | 6.6 |
| Rank | Competitor | Solving BT | 95% interval | Rank interval | Median turns |
|---|---|---|---|---|---|
| 1 | GPT-5.5 [codex] | +2.60 | 1–1 | 94 | |
| 2 | GPT-5.5 [mini-swe-agent] | +1.38 | 2–2 | 84 | |
| 3 | DeepSeek-V4-Pro [mini-swe-agent] | +0.17 | 3–7 | 61 | |
| 4 | Qwen3.7-Max [mini-swe-agent] | +0.15 | 3–6 | 83 | |
| 5 | Kimi-K2.7-Code [mini-swe-agent] | +0.02 | 3–7 | 68 | |
| 6 | GLM-5.2 [mini-swe-agent] | -0.08 | 3–7 | 91 |
| Cost component | USD | Share |
|---|---|---|
| Main tournament | ||
| Task creation (incl. failed attempts) | 669.69 | 31.8% |
| Blind self-review validation | 158.34 | 7.5% |
| Blue evaluation | 1281.18 | 60.7% |
| Tournament total | 2109.21 | 100.0% |
| Entrance: Gemini-3.1-Pro [mini-swe-agent] | ||
Benchmark Design
Benchmark design creates tasks, datasets, metrics, and protocols that make AI capabilities measurable and comparisons credible.
See all 389 papers