Task
Best AI Agent for Refactoring
Big refactors fail in a specific way: the agent renames a symbol in four files and misses the fifth, or 'improves' a function and changes its behaviour. No benchmark on this board measures refactoring directly — DeepSWE is the closest proxy, because its tasks are multi-file edits across real repos. This page says so, and uses the DeepSWE split.
The honest answer: refactoring has no dedicated benchmark on the Harness Leaderboard. DeepSWE tasks are the closest proxy — they require reading a repo, making coordinated edits across files, and passing the repo's own tests, which is most of what a refactor is. A harness that scores well on DeepSWE is usually careful with multi-file edits; a harness that scores badly tends to leave the repo in a worse state than it found it.
On DeepSWE at GLM-5.3-Flash low effort, mini-swe-agent leads at 55.9%, followed by DeepSeek Harness (55.6%), Grok Build (55.3%), OpenCode (54.9%) and Claude Code (54.6%) — all within each other's confidence intervals, so treat the top five as tied. Codex is last on this split too, at 39.0%.
Practical advice: for refactors, the harness matters less than the workflow. Run the test suite before and after, keep the change small enough to review, and never let the agent refactor and add features in the same run. The cheapest harness that passes your own tests is the right one — see cheapest per task.
| Harness | DeepSWE (proxy) | 95% CI | Cost / solve |
|---|---|---|---|
| mini-swe-agent | 55.9% | 46.6% – 64.7% | $0.394 |
| DeepSeek Harness | 55.6% | 46.3% – 64.5% | $0.421 |
| Grok Build | 55.3% | 46.0% – 64.2% | $0.285 |
| OpenCode | 54.9% | 45.7% – 63.9% | $0.262 |
| Claude Code | 54.6% | 45.4% – 63.6% | $0.320 |
| fx | 53.8% | 44.5% – 62.7% | $0.294 |
| Hermes Agent | 52.5% | 43.3% – 61.6% | $0.342 |
| OpenClaw | 51.6% | 42.5% – 60.7% | $0.315 |
| Pi | 51.3% | 42.2% – 60.5% | $0.254 |
| Kimi Code | 50.7% | 41.6% – 59.9% | $0.393 |
| Antigravity CLI | 48.9% | 39.8% – 58.1% | $0.589 |
| Qwen Code | 46.0% | 37.0% – 55.2% | $0.473 |
| Oh My Pi | 45.1% | 36.1% – 54.3% | $0.406 |
| Codex | 26.7% | 19.4% – 35.6% | $0.792 |
DeepSWE used as the refactoring proxy (multi-file edits across real repos). Source: Hugging Face Harness Leaderboard v0.1.12, checked December 2, 2026. Costs are estimates (reported tokens × list prices), not real bills.