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.

HarnessDeepSWE (proxy)95% CICost / solve
mini-swe-agent55.9%46.6% – 64.7%$0.394
DeepSeek Harness55.6%46.3% – 64.5%$0.421
Grok Build55.3%46.0% – 64.2%$0.285
OpenCode54.9%45.7% – 63.9%$0.262
Claude Code54.6%45.4% – 63.6%$0.320
fx53.8%44.5% – 62.7%$0.294
Hermes Agent52.5%43.3% – 61.6%$0.342
OpenClaw51.6%42.5% – 60.7%$0.315
Pi51.3%42.2% – 60.5%$0.254
Kimi Code50.7%41.6% – 59.9%$0.393
Antigravity CLI48.9%39.8% – 58.1%$0.589
Qwen Code46.0%37.0% – 55.2%$0.473
Oh My Pi45.1%36.1% – 54.3%$0.406
Codex26.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.

← All tasks · Full leaderboard