SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring
When AI coding agents were tested on real-world multi-file refactoring, even the best model solved only 41.2% of tasks
Existing coding benchmarks are saturating, and an audit found nearly 60% of unsolved SWE-bench Verified instances have flawed tests. This paper introduces SWE-Bench ProMax, an expert-curated benchmark of 170 large-scale refactoring tasks drawn from real commits across seven programming languages. The best evaluated model reached only 41.2% resolve rate, showing that coordinated multi-file refactoring remains a genuine challenge for current AI agents.
METAL LAB explanatory visual
How SWE-Bench ProMax was built and evaluated
Evidence statusMeasured results reported
- Stage 1: Data collectionMined 29,782 candidate commits containing 'refactor' from GitHub repos with 500+ stars, open-source licenses, and 80%+ code in one of seven target languages, after January 2025
- Stage 2: Environment validationBuilt a Docker environment for each candidate commit and confirmed the gold patch actually passes the test suite, discarding failures
- Stage 3: Expert curationFiltered out low-complexity tasks, rewrote issue descriptions from scratch, and removed overly narrow or broad tests, yielding 170 final instances
- Model evaluationTested GPT-5.2, Claude Sonnet 4.6, Gemini-3-Pro, GLM-5, Kimi-K2.5, and Qwen3.5 under mini-swe-agent and OpenHands scaffolds; best resolve rate was 41.2%
- Failure pattern analysisFound agents modify fewer files than required on large patches and that failed attempts burn far more interaction rounds than successful ones
What they did
- The work starts from the concern that existing benchmarks like SWE-bench Verified have become too easy and their test suites are unreliable, so scores no longer clearly reflect real capability.
- The team mined 29,782 candidate 'refactor' commits from GitHub repositories with at least 500 stars, approved open-source licenses, and at least 80% code in one of seven target languages, then filtered down to 170 instances through environment validation and expert rewriting.
- Every issue description was rewritten from scratch to remove ambiguity, and test suites were manually reviewed to remove overly narrow tests (which reject correct solutions) and overly broad tests (which check unstated requirements).
- The benchmark spans Python, Java, TypeScript, Go, C, C++, and Rust, with instances averaging 11.4 modified files and 261.6 lines of code per task, substantially larger than prior benchmarks.
- Six frontier models (Claude Sonnet 4.6, GPT-5.2, Gemini-3-Pro, GLM-5, Kimi-K2.5, Qwen3.5) were evaluated under two agent scaffolds, mini-swe-agent and OpenHands, with GPT-5.2 achieving the top resolve rate of 41.2%.
| Benchmark | Execution Based | Repo Level | Multi Lingual | Refac- toring | Avg. >5 Files | Expert Curated |
|---|---|---|---|---|---|---|
| HumanEval [5] | ✓ | ✓ | ||||
| MBPP [2] | ✓ | ✓ | ||||
| LiveCodeBench [19] | ✓ | |||||
| SWE-bench [21] | ✓ | ✓ | ||||
| Multi-SWE-bench [49] | ✓ | ✓ | ✓ | ✓ | ||
| SWE-PolyBench [33] | ✓ | ✓ | ✓ | |||
| SWE-bench Pro [8] | ✓ | ✓ | ✓ | |||
| SWE-EVO [23] | ✓ | ✓ | ✓ | |||
| Terminal-Bench [26] | ✓ | ✓ | ✓ | |||
| RefactorBench [13] | ✓ | ✓ | ✓ | ✓ | ||
| SWE-Refactor [47] | ✓ | ✓ | ✓ | |||
| SWE-Bench ProMax (Ours) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

| Overall | Avg. Steps | Avg. Cost | Per-Language Resolve Rate | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Py | Java | TS | Go | C | C++ | Rust | ||||
| Mini-SWE-Agent | ||||||||||
| Proprietary | ||||||||||
| Gemini-3-Pro | 26.5 | 58.0 | $0.60 | 17.2 | 15.4 | 14.3 | 26.1 | 50.0 | 45.5 | 27.3 |
| Claude Sonnet 4.6 | 30.6 | 99.5 | $2.32 | 13.8 | 19.2 | 32.1 | 13.0 | 65.0 | 40.9 | 40.9 |
| GPT-5.2 | 21.8 | 25.2 | $0.19 | 17.2 | 15.4 | 21.4 | 13.0 | 45.0 | 31.8 | 13.6 |
| Open-weight | ||||||||||
| GLM-5 | 22.9 | 108.9 | $0.10 | 13.8 | 7.7 | 25.0 | 21.7 | 50.0 | 22.7 | 27.3 |
| Kimi-K2.5 | 26.5 | 85.3 | $0.37 | 17.2 | 23.1 | 21.4 | 17.4 | 60.0 | 31.8 | 22.7 |
| Qwen3.5 | 20.6 | 155.4 | $0.93 | 17.2 | 7.7 | 10.7 | 13.0 | 45.0 | 27.3 | 31.8 |
| OpenHands | ||||||||||
| Proprietary | ||||||||||
| Gemini-3-Pro | 19.4 | 51.2 | $1.49 | 13.8 | 19.2 | 0.0 | 8.7 | 45.0 | 36.4 | 22.7 |
| Claude Sonnet 4.6 | 38.8 | 117.9 | $4.77 | 17.2 | 30.8 | 53.6 | 26.1 | 50.0 | 36.4 | 63.6 |
| GPT-5.2 | 41.2 | 115.1 | $3.60 | 48.3 | 19.2 | 35.7 | 26.1 | 75.0 | 36.4 | 54.5 |
| Open-weight | ||||||||||
| GLM-5 | 36.5 | 114.2 | $0.24 | 20.7 | 34.6 | 28.6 | 34.8 | 65.0 | 45.5 | 36.4 |
| Kimi-K2.5 | 32.9 | 99.6 | $0.72 | 24.1 | 30.8 | 10.7 | 43.5 | 70.0 | 45.5 | 18.2 |
| Qwen3.5 | 36.5 | 141.2 | $0.78 | 37.9 | 26.9 | 17.9 | 39.1 | 65.0 | 54.5 | 22.7 |
| Language | Repository | License |
|---|---|---|
| C | betaflight/betaflight | GPL-3.0 |
| aviggiano/redis-roaring | MIT | |
| davidesantangelo/krep | BSD-2-Clause | |
| radareorg/radare2 | LGPL-3.0 | |
| CESNET/libyang | BSD-3-Clause | |
| arkq/bluez-alsa | MIT | |
| aws/s2n-tls | Apache-2.0 | |
| bitcoin-core/secp256k1 | MIT | |
| openssl/openssl | Apache-2.0 | |
| C++ | deskflow/deskflow | GPL-2.0 |
| ETLCPP/etl | MIT | |
| nasa/fprime | Apache-2.0 | |
| Icinga/icinga2 | GPL-3.0 | |
| LMMS/lmms | GPL-2.0 | |
| OpenOrienteering/mapper | GPL-3.0 | |
| WasmEdge/WasmEdge | Apache-2.0 | |
| bloomberg/blazingmq | Apache-2.0 | |
| biojppm/rapidyaml | MIT | |
| Go | cli/cli | MIT |
| go-gitea/gitea | MIT | |
| TecharoHQ/anubis | MIT | |
| restic/restic | BSD-2-Clause | |
| OpenListTeam/OpenList | AGPL-3.0 | |
| caddyserver/caddy | Apache-2.0 | |
| derailed/k9s | Apache-2.0 | |
| gitleaks/gitleaks | MIT | |
| gohugoio/hugo | Apache-2.0 | |
| grpc/grpc-go | Apache-2.0 | |
| istio/istio | Apache-2.0 | |
| jesseduffield/lazygit | MIT |
| Language | #Repos | #Inst. | Avg. #Files | Avg. LOC | Avg. #Non-test |
|---|---|---|---|---|---|
| C | 9 | 20 | 17.9 | 424.1 | 15.2 |
| C++ | 9 | 22 | 21.4 | 196.3 | 16.0 |
| Go | 16 | 23 | 16.0 | 227.4 | 9.4 |
| Java | 11 | 26 | 20.8 | 309.8 | 16.8 |
| Python | 18 | 29 | 10.6 | 299.8 | 7.0 |
| Rust | 5 | 22 | 14.5 | 284.8 | 11.0 |
| TypeScript | 2 | 28 | 11.9 | 122.6 | 7.5 |
| Overall | 70 | 170 | 15.9 | 261.6 | 11.4 |
| Lang. | Repository | Files | LOC | Refactoring summary |
|---|---|---|---|---|
| C++ | nasa/fprime | 244 | 559 | Unify header includes across framework |
| Java | plantuml/plantuml | 94 | 1,629 | Add hour-level time resolution to Gantt engine |
| C | betaflight/betaflight | 62 | 846 | Rename motor protocol configuration fields |
| Rust | tracel-ai/burn | 49 | 1,084 | Unify scalar arguments across tensor operations |
| Go | OpenListTeam/OpenList | 47 | 608 | Refactor upload stream buffering across drivers |
| Python | google/langextract | 30 | 1,960 | Centralize provider output-format handling |
| TS | ant-design/ant-design | 27 | 97 | Unify destroyOnHidden across components |
Findings
- Across six frontier models and two agent scaffolds, the best model (GPT-5.2) achieved only 41.2% resolve rate, far below the 75%+ that frontier agents reach on SWE-bench Verified.
- Open-weight models GLM-5 and Qwen3.5 both reached 36.5% under OpenHands, close to GPT-5.2 (41.2%) and Claude Sonnet 4.6 (38.8%), while costing only $0.24 per instance versus $4.77 for Claude Sonnet 4.6, roughly one-twentieth as much.
- Comparing files modified by agents against the gold patch showed agents modify far fewer files for large patches specifically: the gold patch CDF reaches 90% around 20 files, while agents reach 90% by about 10 files.
- Failed attempts consumed substantially more interaction rounds than successful ones, consistent with agents falling into unproductive edit-revert cycles.
- Performance varied widely by language with no single model dominating: Claude Sonnet 4.6 led on TypeScript (53.6%) and Rust (63.6%), GPT-5.2 led on Python (48.3%) and C (75.0%), and GLM-5 led on Java (34.6%).

Where it can be used
- Can be used as a standard benchmark to evaluate how well AI coding agents handle large-scale, multi-file refactoring tasks.
- Useful for comparing how different agent scaffolds or prompting strategies affect cross-file coordination ability.
- Provides a reference point for weighing resolve rate against cost efficiency when choosing between open-weight and proprietary models.
- Enables analysis of how language-specific features (type systems, memory models, etc.) affect agent performance across seven languages.
Limits and open work
- The benchmark is relatively small (170 instances, 70 repositories), and coverage for some languages is concentrated in very few repositories (e.g., TypeScript's 28 instances come from just 2 repositories).
- Evaluation was limited to two agent scaffolds, mini-swe-agent and OpenHands, so results with other agent architectures are untested.
- Task category and reasoning-skill labels (Appendix B) were generated by Claude Sonnet 4.6 for analysis purposes only and do not affect the benchmark's ground truth or evaluation outcomes.
- Commits were restricted to those made after January 2025, which limits but does not fully guarantee against training data contamination for newer models.
Why it matters
Refactoring is one of the most common real-world software engineering activities, requiring coordinated, behavior-preserving edits across many files, which makes it a more realistic and demanding test of agent capability. As older benchmarks saturate and lose credibility, this benchmark gives the field an unsaturated, quality-checked yardstick for measuring genuine progress in AI coding agents.
Terms in this paper
- SWE-bench · A well-known family of benchmarks that evaluates AI coding agents using real GitHub issues and repositories
- code refactoring · Restructuring code without changing its observable behavior
- resolve rate · The percentage of tasks where the agent's code changes pass all tests in the suite
- gold patch · The original developer's actual code changes, used as the reference solution
- agent scaffold · The execution framework (e.g., mini-swe-agent, OpenHands) that lets a model view files, edit code, and run commands in a loop
Original abstract (English)
As AI coding agents take on increasingly complex, long-horizon software engineering tasks, existing benchmarks are rapidly saturating and their evaluation quality has come under serious scrutiny: a recent audit found that nearly 60% of unsolved SWE-bench Verified instances contain flawed tests -- either overly narrow tests that reject correct solutions or overly broad tests that check unstated requirements -- and that frontier models can verbatim reproduce gold patches from training data. Code refactoring, which requires coordinated, behavior-preserving changes across many files, offers a substantially harder and more realistic test of agent capability, yet remains underserved by current benchmarks. We introduce SWE-Bench ProMax, an expert-curated, multilingual code refactoring benchmark of 170 instances drawn from real commits across seven programming languages (Python, Java, TypeScript, Go, C, C++, and Rust). Every instance undergoes rigorous, multi-stage curation that directly addresses the quality problems identified in prior benchmarks: issue descriptions are rewritten from scratch to provide precise, unambiguous specifications, and test suites are manually reviewed to remove overly narrow and overly broad tests. Tasks with insufficient complexity or limited cross-file scope are filtered out, yielding a benchmark of challenging, large-scale refactoring tasks that average 11.4 modified files and 261.6 lines of code per instance, substantially exceeding the scale of existing benchmarks. Experiments with frontier models under two agent scaffolds show that the best model achieves only 41.2% resolve rate, confirming that SWE-Bench ProMax presents a meaningful and unsaturated challenge for current AI coding agents. Our benchmark is available at https://huggingface.co/datasets/swe-bench-promax/SWE-Bench-ProMax.
Read on arXivLatest papers
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?AI coding agents were tested on fixing real scientific software, and even the best one failed more than half the time
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM ServingMaking sparse attention fast enough and accurate enough for real LLM serving, not just papers
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM AgentsMaking customer-service AI agents follow the whole procedure, not just avoid one bad action
- EXIMO: VLM Guided Exploration of VLA PoliciesTeaching a robot new chores without human teleoperation, by letting a chatty AI supervise it
- EnvHarness: Awakening Static Worlds for Agent LearningInstead of building new training worlds from scratch, this work adds a plug-in layer that reshapes existing ones around each agent's actual weaknesses
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI assistants would rather double-check facts than ask you a question, even when asking is the right call
- SynFlow: A Multidimensional Diachronic Semantic Analysis ToolkitAn open-source tool that breaks down how a word's meaning changed, not just that it changed
- Automated Summarization of Financial News Using Large Language Models and Retrieval-Augmented Generation: An Early Empirical Study (Fall 2023)Testing AI summaries of stock news, the simple approach beat the trendy retrieval-based one
Latest from METAL LAB
- Sakana AI Signs Deal With Japan's Defense Ministry for Intelligence Analysis AI Trial
- Hermes Agent builds its own skills the more you use it
- Is training AI on copyrighted books legal? Courts are still fighting it out
- Chinese gray market sells Anthropic Claude tokens at 10% of list price
- Even the Best AI Runaway Response Plan Among Five Major Labs Scores Only 3
Figures: Yuling Shi et al., arXiv:2608.09802, CC BY 4.0