# SWE Refactor Bench: Can Coding Agents Complete a Long-Horizon, Whole-Repository Stack Migration? (SWE Refactor Bench)

> Tests whether coding agents can complete long-horizon, whole-repository stack migrations while preserving the original program's behavior.

Canonical page: https://benchlm.ai/benchmarks/swe-refactor-bench

- Category: [Agentic](/agentic)
- Last updated: October 7, 2026 snapshot

## About SWE Refactor Bench

- Year: 2026
- Tasks: 20 whole-repository stack migrations
- Format: Migration audit, frozen behavioral checks, and agentic verification
- Difficulty: 6- to 30-hour autonomous repository migrations
- Paper: [SWE Refactor Bench: Can Coding Agents Complete a Long-Horizon, Whole-Repository Stack Migration?](https://arxiv.org/abs/2608.23564)

SWE Refactor Bench contains 20 repository-wide migrations across languages, frameworks, platforms, and build systems. A run receives credit only after the migration audit confirms that the old stack is gone, every frozen behavioral check passes, and six coding agents fail to find an executable counterexample. We mirror all 26 model, client, and reasoning-effort configurations as display-only evidence.

SWE Refactor Bench is currently displayed on BenchLM for reference, but it is excluded from the weighted scoring formula.

## Leaderboard (26 configurations)

| Rank | Model | Configuration | Creator | Score |
|------|-------|---------------|---------|-------|
| 1 | [Claude Opus 5](/models/claude-opus-5) | Claude Code · xhigh reasoning · $74.9 per task · 5 accepted · 6 broken · 1 blind | Anthropic | 47.0 |
| 2 | [Claude Opus 5](/models/claude-opus-5) | Claude Code · high reasoning · $55.7 per task · 4 accepted · 4 broken · 2 blind | Anthropic | 34.5 |
| 3 | [Claude Opus 5](/models/claude-opus-5) | Claude Code · max reasoning · $72.4 per task · 3 accepted · 4 broken · 2 blind | Anthropic | 31.0 |
| 4 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · max reasoning · $143.5 per task · 4 accepted · 3 broken · 0 blind | OpenAI | 28.5 |
| 5 | [Claude Opus 5](/models/claude-opus-5) | Claude Code · medium reasoning · $38.4 per task · 2 accepted · 5 broken · 2 blind | Anthropic | 28.5 |
| 6 | [Claude Opus 5](/models/claude-opus-5) | Claude Code · low reasoning · $34.8 per task · 2 accepted · 3 broken · 0 blind | Anthropic | 20.5 |
| 7 | [Kimi K3](/models/kimi-k3) | Claude Code · max reasoning · $28.9 per task · 2 accepted · 3 broken · 0 blind | Moonshot AI | 19.5 |
| 8 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · high reasoning · $7.7 per task · 1 accepted · 4 broken · 0 blind | OpenAI | 19.0 |
| 9 | [Claude Sonnet 5](/models/claude-sonnet-5) | Claude Code · medium reasoning · $11.9 per task · 1 accepted · 3 broken · 0 blind | Anthropic | 15.0 |
| 10 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · max reasoning · $2.8 per task · 0 accepted · 3 broken · 1 blind | OpenAI | 10.5 |
| 11 | [Qwen3.8 Max](/models/qwen3-8-max) | Claude Code · max reasoning · $14.5 per task · 2 accepted · 0 broken · 4 blind | Alibaba | 10.0 |
| 12 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · xhigh reasoning · $19.1 per task · 0 accepted · 3 broken · 1 blind | OpenAI | 9.5 |
| 13 | [Claude Sonnet 5](/models/claude-sonnet-5) | Claude Code · xhigh reasoning · $27.0 per task · 1 accepted · 1 broken · 1 blind | Anthropic | 9.0 |
| 14 | [Claude Sonnet 5](/models/claude-sonnet-5) | Claude Code · max reasoning · $27.5 per task · 1 accepted · 1 broken · 1 blind | Anthropic | 8.5 |
| 15 | [DeepSeek V4 Flash 0731](/models/deepseek-v4-flash-0731) | Claude Code · max reasoning · $4.3 per task · 0 accepted · 2 broken · 1 blind | DeepSeek | 7.0 |
| 16 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · low reasoning · $5.9 per task · 0 accepted · 2 broken · 0 blind | OpenAI | 7.0 |
| 17 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · medium reasoning · $6.0 per task · 0 accepted · 2 broken · 3 blind | OpenAI | 6.5 |
| 18 | [GLM-5.2](/models/glm-5-2) | Claude Code · max reasoning · $17.5 per task · 0 accepted · 2 broken · 1 blind | Z.AI | 6.5 |
| 19 | [Claude Sonnet 5](/models/claude-sonnet-5) | Claude Code · high reasoning · $24.6 per task · 0 accepted · 2 broken · 2 blind | Anthropic | 6.0 |
| 20 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · xhigh reasoning · $2.9 per task · 0 accepted · 2 broken · 2 blind | OpenAI | 5.5 |
| 21 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · none reasoning · $1.6 per task · 0 accepted · 1 broken · 1 blind | OpenAI | 4.0 |
| 22 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · low reasoning · $1.7 per task · 0 accepted · 1 broken · 1 blind | OpenAI | 4.0 |
| 23 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · high reasoning · $1.8 per task · 0 accepted · 1 broken · 2 blind | OpenAI | 4.0 |
| 24 | [GPT-5.6 Sol](/models/gpt-5-6-sol) | Codex CLI · none reasoning · $2.9 per task · 0 accepted · 1 broken · 0 blind | OpenAI | 4.0 |
| 25 | [Claude Sonnet 5](/models/claude-sonnet-5) | Claude Code · low reasoning · $4.4 per task · 0 accepted · 1 broken · 1 blind | Anthropic | 4.0 |
| 26 | [GPT-5.6 Luna](/models/gpt-5-6-luna) | Codex CLI · medium reasoning · $1.7 per task · 0 accepted · 0 broken · 1 blind | OpenAI | 0.0 |

## FAQ

### What does SWE Refactor Bench measure?

Tests whether coding agents can complete long-horizon, whole-repository stack migrations while preserving the original program's behavior.

### Which model leads the published SWE Refactor Bench snapshot?

Claude Opus 5 currently leads the published SWE Refactor Bench snapshot with a score of 47.0.

### How many models are evaluated on SWE Refactor Bench?

The October 7, 2026 snapshot contains 26 configurations across 8 AI models.

### Does SWE Refactor Bench affect BenchLM's overall score?

Not directly. SWE Refactor Bench is still displayed on BenchLM for reference, but it is excluded from the weighted scoring formula.
