Navers lab
← Research

SWE Refactor Bench

Can a coding agent move a whole repository to a new stack — another language, framework, platform or build system — and change nothing about what it does?

Navers lab · Einsia AI · 2026

20
whole-repository migrations
520
graded runs · 26 configurations
28
accepted, all three stages
13/20
tasks solved by nobody

The job

Replacing the stack underneath a system that still has to work — C to Rust, Maven to Gradle, POSIX to WebAssembly — costs senior engineers weeks, and most of those weeks go into proving that nothing changed. It is long-horizon work: the unit is a repository, not a function, and one attempt runs for hours or days.

Top: prior benchmarks grade a migration in one stage, a behavioural suite with no migration audit in front of it, against our three stages — migration audit, behavioural tests, agentic verification. Below left, the four migration categories; below right, the scores of eight frontier models.

The leaderboard

All 26 configurations — 8 models, each swept over the reasoning-effort levels it exposes — on the same 20 tasks. The best of them scores 47.0 of 100, which is further from a finished migration than it is from the bottom of the strip.

Score out of 100 · one column per configuration less effort more
claude-opus-5 at low effort: composite 20.5 of 100, 2 of 20 runs accepted.
claude-opus-5 at medium effort: composite 28.5 of 100, 2 of 20 runs accepted.
claude-opus-5 at high effort: composite 34.5 of 100, 4 of 20 runs accepted.
47.0 claude-opus-5 at xhigh effort: composite 47.0 of 100, 5 of 20 runs accepted.
claude-opus-5 at max effort: composite 31.0 of 100, 3 of 20 runs accepted.
1
claude-opus-5
gpt-5.6-sol at none effort: composite 4.0 of 100, 0 of 20 runs accepted.
gpt-5.6-sol at low effort: composite 7.0 of 100, 0 of 20 runs accepted.
gpt-5.6-sol at medium effort: composite 6.5 of 100, 0 of 20 runs accepted.
gpt-5.6-sol at high effort: composite 19.0 of 100, 1 of 20 runs accepted.
gpt-5.6-sol at xhigh effort: composite 9.5 of 100, 0 of 20 runs accepted.
28.5 gpt-5.6-sol at max effort: composite 28.5 of 100, 4 of 20 runs accepted.
2
gpt-5.6-sol
19.5 kimi-k3 at max effort: composite 19.5 of 100, 2 of 20 runs accepted.
3
kimi-k3
claude-sonnet-5 at low effort: composite 4.0 of 100, 0 of 20 runs accepted.
15.0 claude-sonnet-5 at medium effort: composite 15.0 of 100, 1 of 20 runs accepted.
claude-sonnet-5 at high effort: composite 6.0 of 100, 0 of 20 runs accepted.
claude-sonnet-5 at xhigh effort: composite 9.0 of 100, 1 of 20 runs accepted.
claude-sonnet-5 at max effort: composite 8.5 of 100, 1 of 20 runs accepted.
4
claude-sonnet-5
gpt-5.6-luna at none effort: composite 4.0 of 100, 0 of 20 runs accepted.
gpt-5.6-luna at low effort: composite 4.0 of 100, 0 of 20 runs accepted.
gpt-5.6-luna at medium effort: composite 0.0 of 100, 0 of 20 runs accepted.
gpt-5.6-luna at high effort: composite 4.0 of 100, 0 of 20 runs accepted.
gpt-5.6-luna at xhigh effort: composite 5.5 of 100, 0 of 20 runs accepted.
10.5 gpt-5.6-luna at max effort: composite 10.5 of 100, 0 of 20 runs accepted.
5
gpt-5.6-luna
10.0 qwen3.8-max at max effort: composite 10.0 of 100, 2 of 20 runs accepted.
6
qwen3.8-max
7.0 dsv4-flash at max effort: composite 7.0 of 100, 0 of 20 runs accepted.
7
dsv4-flash
6.5 glm-5.2 at max effort: composite 6.5 of 100, 0 of 20 runs accepted.
8
glm-5.2
26 configurations, 20 tasks each. Colour is the model, depth is the effort level. The printed number is the group's best; hover any column for its own.

The rest of this page is why those numbers are so low, and why a ranking alone would not have found it.

A passing suite cannot see this work

Bug fixing starts red and turns green, and that jump is the evidence. Migration starts green. Hand the original repository back untouched and it still scores full marks — so the maximum of the reward sits on a submission with no work in it, and more tests cannot move it.

Repair

The suite is the goal.
Suite fails Suite passes

Agent edits the repository

Passing is evidence the work happened.

Preservation

The suite is already satisfied.
Suite passes Suite passes

Agent changes nothing

Passing is evidence of nothing at all.

We call it blindness: the suite is not incomplete, it is answering a different question — was anything broken, not was anything changed.

Four kinds of debt

20 migrations of load-bearing open-source infrastructure — SQLite, zlib, libsodium, GraphHopper and others. Each moves exactly one layer of the stack, keeps the interface, and gets 6 to 30 hours of autonomous work, offline.

Class Tasks Checks Migrated Accepted Score
Build-toolchain rewrite What produces the artifact changes, and the package is the observable. 3 7,770
80.8%
6
31.41
Platform port The host the code assumes changes. 3 6,725
57.7%
4
17.18
Framework rewrite The language stays, the framework it is organized around is replaced. 7 55,852
72.5%
14
11.98
Language rewrite The implementation language moves, the artifact does not. 7 59,771
54.9%
4
5.60

Passing the gate and being accepted are different things: build toolchain clears the gate most often and still loses most of it at stage III, while framework rewrite takes half of all acceptances.

Three stages in series

The agent sees a repository, an instruction and an offline image. It never sees any of this.

Left, task execution: the agent takes a repository on the source stack and works it to the target stack over 6 to 30 hours, cycling through understand, plan, rewrite, build and debug, verify. Right, the hidden evaluation it never touches: migration audit, behavioural tests, agentic verification.
I

Migration Audit

Is the old stack gone from the artifact that is actually built?

Reads mechanism, not strings. Holds a veto.

II

Behavioural Tests

130,118 checks recorded from the original.

All of them, or the run scores zero.

III

Agentic Verification

Six coding agents, one hour each, hunting for a difference.

Only an executable counterexample counts.

S(τ) = 1[migration happened] · 1[every check passes] · (0.4 + 0.6 · s/6)  ∈  {0} ∪ [0.4, 1]

What the models did

26 configurations, 520 graded runs, 8 models — and 28 of those runs cleared all three stages. The configuration at the top of the board, claude-opus-5 at xhigh, spent $75 a task to get there.

Ranking them is the easy part. The two findings below are what the ranking cannot say.

Two abilities, not one

Migration completeness and behavioural correctness are distinct abilities, and the failures divide along that line. A few runs preserve the behaviour by skipping the migration, and only stage I stops them. Most attempt the migration and break the behaviour doing it, and only stage II stops those. Neither stage can stand in for the other: stage II alone would reward doing nothing, stage I alone would reward doing damage.

Two scatter plots sharing their axes: horizontally the share of runs that pass every test in the suite, vertically the share that actually migrated. Left, one point per model; right, one point per task, sized by accepted submissions and coloured by migration category.

The last mile

Once the migration is real, most runs get behaviour back above 99%. Almost none finish it: a quarter make no error at all, and two thirds of those still lose to a counterexample inside the hour.

Left: how far the migrated runs get on the fixed suite. Right: how many of the six verifiers each perfect submission survived.

A stronger verifier is simply a higher bar: retire the two strongest and the remaining four would accept 46 submissions instead of 28.

What we release

Score table

520 rows

Every graded run: gate verdict, checks passed, verifiers survived, composite, tokens, duration.

See the board

Trajectories

248k calls

Every tool call of every graded run, in full, across two harnesses.

Browse runs

Tasks

20 images

State A, the instruction, the offline image, the criteria and the frozen suite.

Browse tasks

Citation

@misc{hong2026swerefactorbenchcoding,
  title   = {SWE Refactor Bench: Can Coding Agents Complete a Long-Horizon,
             Whole-Repository Stack Migration?},
  author  = {Deyao Hong and Yizhe Chi and Wenyi Li and Xiaoqiu Wang and
             Mingju Gao and Kaisen Yang and Bingxiang He and Youjie Zheng and
             Calvin Xiao and Qinhuai Na},
  journal = {arXiv preprint arXiv:2608.23564},
  year    = {2026}
}