Coding agents resolve at most 41% of 170 real multi-file refactoring tasks
A benchmark built from real refactoring commits in seven languages, with hand-checked tests and rewritten descriptions, keeps six frontier models below 42%.

SWE-Bench ProMax is a benchmark for AI coding agents built around one demanding kind of work: refactoring, meaning restructuring existing code without changing what it does from the outside. Its 170 tasks come from real refactoring commits in open-source projects across seven programming languages, and each was checked by hand before it was kept. The paper is posted on arXiv and was published as a conference paper at COLM 2026. In the authors' own evaluation, the strongest of six frontier models, GPT-5.2 running inside the OpenHands agent software, resolved 41.2% of the tasks.
The benchmark matters less for its leaderboard than for how its tasks were built. Coding-agent benchmarks usually give a single verdict per task: the agent's code either passes the tests or it does not. That verdict is only as trustworthy as the tests. The authors cite an audit of SWE-bench Verified, a widely used benchmark on which frontier agents had passed 75%. Among the instances that agents still failed, the audit found that 35.5% had overly narrow tests, which demand one specific implementation and reject correct alternatives, and 18.8% had overly broad tests, which check behaviour the task never asked for. In all, the audit found such defects in nearly 60% of the unsolved tasks. According to the paper, the audit led OpenAI to deprecate the benchmark. The authors also point to ambiguous problem descriptions, to data contamination (benchmark answers appearing in a model's training data, which inflates scores), shown by frontier models reproducing reference solutions word for word, and to the small scale of typical tasks: 86% of SWE-bench Verified instances modify a single file.
How it works
Each task has four parts. There is a Docker container, a sealed, reproducible software environment, holding the project as it stood before the refactoring. There is a plain-language description of what needs to change, a test suite, and the gold patch, the change the original developer actually made, which serves as the reference solution. An agent counts as having resolved a task only if its changes pass every test.
The tasks were assembled in three stages. First, the authors searched GitHub for projects with at least 500 stars, an approved open-source licence and at least 80% of their code in one of the seven target languages. From those they took commits made after January 2025 whose messages mention "refactor" but not "bug fix", and which touch both test and non-test files. Second, they built working environments automatically, using tools including SWE-Factory and SpecBuild, applied each gold patch, and discarded anything that would not build or whose gold patch failed its own tests. Third, human experts, assisted by language models, analysed each commit, removed tasks that were too simple (single-file changes, too few lines changed, or overly simple patterns), stripped out overly narrow and overly broad tests, and rewrote each task description from scratch so that it was both necessary and sufficient to arrive at the gold patch. A final human check confirmed that the description, tests and gold patch agreed with one another.
The filter was severe. Of 29,782 initial candidates, 170 survived, roughly 0.57%, drawn from 70 repositories. Models were then run under two agent scaffolds, the software that wraps a model with tools such as a shell, file editing and search, and drives its loop of acting and observing the results. The two were mini-swe-agent and OpenHands. Each run was capped at 300 steps and $10 per task, and the score is Pass@1, the percentage of tasks solved on a single attempt.
What the evidence shows
The tasks are large. The average gold patch touches 11.5 source files and 261.6 lines of code, plus 4.5 test files, for a mean of 15.9 files in total. Thirty per cent of tasks modify more than ten files, and 32% change more than 200 lines. At the extreme, one C++ task from NASA's fprime project touches 244 files. Task descriptions average about 685 tokens, the word-fragment units models read.
Six models were tested under both scaffolds, giving 12 configurations: the proprietary Gemini-3-Pro, Claude Sonnet 4.6 and GPT-5.2, and the open-weight GLM-5, Kimi-K2.5 and Qwen3.5, whose parameters are publicly released. Every configuration scored between 19.4% and 41.2%. Under OpenHands, GPT-5.2 led at 41.2% for an average cost of $3.60 per task, followed by Claude Sonnet 4.6 at 38.8% for $4.77. GLM-5 and Qwen3.5 both reached 36.5%, at $0.24 and $0.78 respectively, and Kimi-K2.5 scored 32.9% for $0.72. GLM-5 thus came within 4.7 points of the leader at about a twentieth of Claude Sonnet 4.6's per-task cost. Spending more did not reliably buy more: Gemini-3-Pro spent $1.49 per task for 19.4%, and Qwen3.5 took the most steps under both scaffolds without leading either.
The choice of scaffold mattered substantially. Moving from mini-swe-agent to OpenHands raised GPT-5.2 from 21.8% to 41.2%, Qwen3.5 from 20.6% to 36.5% and GLM-5 from 22.9% to 36.5%. Gemini-3-Pro was the only model to do worse, falling from 26.5% to 19.4%. No model led in every language. Under OpenHands, Claude Sonnet 4.6 topped TypeScript at 53.6% and Rust at 63.6%, while Gemini-3-Pro scored zero on TypeScript. GPT-5.2 led on Python and C, GLM-5 on Java, Kimi-K2.5 on Go and Qwen3.5 on C++. C was the highest-scoring language in all but one configuration: across all configurations, C scores ranged from 45% to 75%.
The authors also examined how agents fail, for two models, Claude Sonnet 4.6 and Kimi-K2.5. Their main finding is what they call incomplete refactoring: agents change the core files but do not carry the change through to every place that depends on it. The agents' edits match the gold patches in scope up to about five files, but they stop widening sooner. Both agents' distributions reach 90% of tasks by about ten modified files, whereas the gold patches only get there at around twenty. The authors also describe failed attempts as using more rounds of interaction than successful ones, a pattern they attribute partly to unproductive exploration, repeated cycles of editing, testing and reverting that use up steps without touching new files.
What it does not show
The headline claim, that this benchmark is hard and far from saturated, is well supported. The finer comparisons are much less certain. The paper reports no repeated runs, variance or confidence intervals. With 170 tasks, the gap between GLM-5 and GPT-5.2 amounts to about eight tasks. Spread across seven languages, each language has only a couple of dozen tasks, so a single task moves a language score by several points, and per-language rankings could easily reshuffle on a rerun. The size of the scaffold effect also means that a model ranking here is partly a ranking of set-ups. The comparison with SWE-bench Verified's 75% relies on a figure the authors cite from other models and set-ups, not one measured in the same conditions.
The quality of the tasks rests on a described process rather than on measurements. The paper does not report how many experts did the curation, how often they agreed, or how many tests were removed. Descriptions were rewritten with help from a language model the paper does not name for that step, and they were written with the gold patch and tests in view, which may make them more prescriptive than real refactoring requests. Tests come from the original commit's own changes, so they may still favour the developer's particular structure, despite the filtering. Selecting commits by keyword may also have missed some refactorings or let in some that were not.
There are further gaps. Contamination is one of the paper's stated motivations, yet it includes no contamination check comparing commit dates with model training cutoffs. The step and cost caps may have limited performance on the largest tasks, and the paper does not say how often runs hit them. There is no human baseline. The failure analysis covers two models, does not state which scaffold was used, and describes the difference in interaction rounds only qualitatively.
Where it fits
The authors place their benchmark at the end of a progression. Early tests such as HumanEval and MBPP judged single functions. SWE-bench moved to whole repositories, and successors extended it to more languages (Multi-SWE-bench, SWE-PolyBench), to harder or longer tasks (SWE-bench Pro, SWE-EVO, Terminal-Bench) and to fixes for contamination and infrastructure (SWE-bench Live, SWE-rebench, SWE-Factory). The authors identify only two earlier refactoring benchmarks, each limited to one language. RefactorBench has 100 Python tasks averaging 4.3 files, and SWE-Refactor has 1,099 Java instances validated automatically with no human review of the tests. The authors argue that theirs is the only benchmark that combines execution-based grading, repository scale, multiple languages, a focus on refactoring, an average of more than five files and expert curation. They also say it offers a common yardstick for studies of language-model refactoring, which have so far used incompatible metrics such as counts of code smells or whether the code compiles.
For this series, the paper is a useful starting point because of what it changes and what it keeps. It keeps the single resolved-or-not verdict, but tries to earn that verdict by scrubbing the tests and descriptions behind it, treating flawed tests as the first thing to fix. Its own failure analysis, though, hints at what a binary score hides. An agent that correctly refactors five of the twenty files a task needs receives the same zero as one that does nothing. Measuring that partial progress, and checking the graders themselves, is the territory the rest of the series will cover.
- Paper
- SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring
- Authors
- Yuling Shi, Jinghan Xu, Kelin Fu, Wenhao Zeng, Shilin He, Lei Zhang, Yue Liu, Zelin Zhao, Terry Yue Zhuo, Jialun Cao, Siyu Ye, Tianyu Liu et al.
- Venue
- arXiv preprint — not yet peer reviewed · 10 August 2026
- Link
- arxiv.org/abs/2608.09802
- Index
- stacks.braintank.ai
- Cite


