SWE-sweep: Can Agents Autonomously Find and Fix Bugs?
Lieret et al. in Agents
Can an agent debug a repository with no bug hints?
SWE-sweep: Can Agents Autonomously Find and Fix Bugs?
Issue-led repair starts with a clue
These tasks often supply a failure description, signal or location before coding begins.
The agent must scour and repair a whole repository with general discovery criteria, but no bug-specific descriptions, locations or tests.
Finding the work itself becomes part of the work.
A bug must violate a contract
- 1
Define discoverability
Expected behavior must be recoverable from repository docs, tests, types, callers or cited standards; unmistakable failures like crashes also qualify.
- 2
Apply the screen
Three LM judges had to agree; after seeing their reasoning, reviewers accepted 49 of 50 sampled bugs by a 3-of-4 majority.
From a pull request to a task
- 1
Collect confirmed fixes
Most candidates are issue-linked merged PRs with a source fix and tests; the source change becomes the benchmark reference repair.
- 2
Find a crowded snapshot
Estimate bug lifetimes from history, then choose a commit where many candidates coexist and check that fixes reproduce.
- 3
Filter the candidates
Quality checks leave 4,068 bugs from 704,386 candidates across 100 repositories and 22 languages.
Where bug candidates overlap

For repositories 1-50, the figure estimates concurrent PR-derived bug candidates over history. High-count commits are shortlisted; patches must still apply and tests reproduce before selection.
A patch must fix and not break
- 1
Agent view
The agent sees the base repository and existing tests, but not bug-specific hidden tests, Git history or internet access.
- 2
Bug-specific grade
At least one hidden test must fail before repair, and every hidden test must pass afterward.
- 3
Regression check
The original test suite must also pass, or the bug earns no credit.
The leader still has a low ceiling

With mini-SWE-agent across 100 repos, Sol 5.6 (xhigh) resolves 4.7% of 4,068 bugs; runner-up Luna 5.6 (xhigh), 2.5%. Plot compares resolved-bug share with mean total output tokens per repo; line marks the Pareto frontier.
Issue descriptions expose the bottleneck
On the first 20 repositories (684 bugs), Sol 5.6 (xhigh) resolves 4.8%.
Adding those descriptions raises the same configuration to 75.3%, while all bugs still share one run.
That jump points to finding and localizing bugs as a major bottleneck, not proof that repair is solved.
One trajectory makes the job harder
On the first 20 repositories (684 bugs), line ranges yield 19.2% for Sol 5.6 (xhigh) and 10.7% for Luna 5.6 (xhigh).
With the same hints, separate runs raise the scores to 39.2% for Sol and 31.3% for Luna.
Handling many bugs in one trajectory adds difficulty beyond locating them.
File contact is not a complete repair
- 1
Separate analysis
Across four models, analysis covered 4,165 bug instances; 164 final outcomes were unavailable.
- 2
Read reference files
Agents read a file changed by the reference fix for 23.4%-38.5% of instances.
- 3
Edit and resolve
They edited such a file for 6.0%-21.5%; reported resolution rates were 1.3%-5.0%.
Where the benchmark has blind spots
Selective ground truth
Only reported bugs with upstream fixes and tests enter; unreported and unresolved defects are absent.
Coverage trade-off
Discoverability and test-quality filters may exclude meaningful bugs and do not assess importance or difficulty.
Harness matters
Main scores use mini-SWE-agent; native harnesses changed scores on a smaller subset.
Why it matters
- The hard work starts before patching: infer a repository's intended behavior, then repair it without regression.
- Use issue-text and location-hint ablations to separate discovery failures from multi-bug coordination.
- To include never-reported defects, future benchmarks need ways to validate bugs without an upstream fix as ground truth.
12 slides, 3 min
1 day ago