Model · 7–9 min read · 2026-07-07

SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review

An agentic reviewer that explores the repo, traces the root cause, and hands back structured feedback — turning a one-shot patch into a generate-review-revise loop. SWE-Review-30B-A3B.


A coding agent that resolves an issue submits one patch and stops. If the patch is subtly wrong — fixes the symptom but not the cause, breaks an edge case, touches the wrong file — nothing catches it. Human software engineering doesn’t work that way: someone reviews the change, traces whether it actually addresses the problem, and sends it back with notes. SWE-Review gives agents that second half of the loop.

SWE-Review-30B-A3B is an agentic code-review model. Rather than scoring a diff in isolation, it behaves like a reviewer: it independently explores the repository through tool calls, traces the root cause of the issue on its own, and compares its diagnosis against the submitted PR — then emits a structured review decision with diagnostic feedback a generator can revise against. It is fine-tuned from Qwen3-30B-A3B, a mixture-of-experts model with 30B total but only 3B active parameters, so it reviews at the cost of a small dense model.

SWE-Review generate, review, and revise pipeline across three PR generators.
Figure 1 — closing the loop. A reviewer independently reconstructs the issue, evaluates the candidate PR, and returns a structured diagnosis for targeted revision. Repeating this loop raises resolve rate by as much as 29.4 percentage points.

+29.4pp

closed-loop gain

3.7× / 6.7×

TTS gain / efficiency

1,384

benchmark PRs

8,914

training trajectories

The generate-review-revise loop

The unit of work is not a single attempt but a loop. A generator agent produces a candidate patch; SWE-Review explores the repository from scratch, builds its own understanding of what the issue requires, and checks the candidate against that understanding; its feedback goes back to the generator for a revised attempt. The reviewer’s independence is the point — because it traces the root cause itself rather than trusting the generator’s narrative, it catches fixes that look right but aren’t.

How it was trained

The model is fine-tuned on SWE-Review-Traj, a set of 8,914 agentic review trajectories — full tool-calling sessions of a reviewer exploring a repo and reaching a verdict. Training uses LLaMA-Factory with DeepSpeed ZeRO-3, four epochs at a 1e-4 cosine-scheduled learning rate, with context extended to 131,072 tokens via YaRN rope scaling so the reviewer can hold a long exploration in context. The recipe is deliberately the same family of machinery as the rest of LegoX — trajectories in, LLaMA-Factory SFT out.

Agentic review beats fixed-context review

SWE-Review-Bench has 1,384 instances, split by the strength of the model that produced the candidate patch — from a strong generator (GLM-5, “high”), whose mistakes are subtle and hard to catch, to a weaker one (Qwen3-30B, “low”). The official comparison holds the reviewer model fixed and changes only the review mode. Decision Accuracy (DA) measures the accept/request-changes decision; Resolve Rate after Revision (RRR) measures whether the feedback actually helps produce a resolving patch.

Review modeGLM-5 · DA / RRRCoder-30B · DA / RRRQwen3-30B · DA / RRR
Single-turn · diff only71.3 / 71.472.0 / 56.780.8 / 41.2
Single-turn · diff + context69.8 / 72.673.8 / 57.682.7 / 44.1
Agentic review75.6 / 75.280.5 / 67.389.4 / 52.6

Agentic review wins across all three generator tiers. Its advantage is largest on the hardest split: +6.7pp DA and +8.5pp RRR over the better single-turn baseline. The difference is not simply access to more context. An agentic reviewer can adaptively gather the evidence needed for this specific issue and PR, rather than receiving one fixed context window chosen in advance.

Cheaper test-time scaling

Because a good reviewer makes the decision of which attempt to trust, it also makes test-time scaling cheaper. Instead of independently resampling many full solutions, SWE-Review reaches a 38.4% resolve rate with only 2.44 samples on average — 3.7× the test-time-scaling gain at 6.7× the efficiency of naïve resampling. The verifier-style intuition from the SWE-Lego post returns here: selection is cheaper than generation, and a reviewer is a selector with reasons.

Resolve rate against sample budget for review-guided iterative revision and independent resampling.Actual samples spent by review-guided iterative revision and independent resampling.

Figure 2 — review-guided test-time scaling. The approval decision gates additional sampling, while the diagnosis directs the next revision. This makes the reviewer useful in a way a scalar score is not: it can say both whether a patch is wrong and how to repair it.

Review trajectories transfer back to issue resolution

Review and resolution share a repository-reasoning skill. Mixing review trajectories with issue-resolution data improves one-shot resolution by as much as +5.6pp and enables one model to run its own review-then-revise loop, improving the final resolve rate by up to +10.6pp. Review is therefore not only an inference-time guardrail; it is also a source of transferable training data.

Using it

The model serves on vLLM with tensor parallelism of 4. A couple of practical notes from the card: use --tool-call-parser hermes (not qwen3_coder), and for OpenHands set OPENHANDS_LLM_NATIVE_TOOL_CALLING=true. There’s also a plugin so it can act as the reviewer inside Claude Code.

What it means for LegoX

LegoX’s pipeline ends at evaluation: collect, roll out, fine-tune, measure. SWE-Review points at what comes after the measurement — a review block that doesn’t just score a model but actively improves its output at inference time, and whose own review trajectories are just another stream of validated, agentic data the pipeline already knows how to produce. The generator and the reviewer are both blocks; closing the loop between them is the natural next composition.

The original SWE-Review project page contains the complete result tables, demo, released resources, and citation. The model and dataset are on the Hub: SWE-Review-30B-A3B and SWE-Review-Traj. To run the pipeline that produces this kind of data, start with the docs.