Research
Sphinx tops SWE-sweep on Mongoose


SWE-sweep asks agents to fix issues in a large repo with no supervision. Sphinx lets small models massively outperform baselines on this task.
Date
Dec 3, 2026
Author
Tony Ou, Harshal Chamdal, Rohan Kodialam
Sphinx Tops SWE-sweep on Mongoose
The volume of code being shipped has grown dramatically as AI coding tools have become ubiquitous. As a result, developers also rely on AI tools to review code and find bugs.
Agents can resolve bugs when given a well-scoped ticket; however, the question of fully autonomous bug finding remains an important, unsaturated benchmark for leading frontier models today.
SWE-sweep is a benchmark from Meta’s Superintelligence Lab addressing this challenge. It curates bugs from public repositories with verified human fixes. The benchmark provides entire codebases to agents without any supervision, and grades based on regression tests written by developers. Agents are scored on the number of bugs successfully resolved – a single regression, however, yields a score of zero.
SWE-sweep contains 100 repositories with over 4,000 bugs. Here, we focus on the Mongoose repository, with 54.5K lines of code and 70 bugs. Our goal is to evaluate if Sphinx’s post-training equips agents to find bugs more effectively, while spending less on tokens.
SWE-sweep’s leaderboard finds GPT-6 Astra resolved 8.9% of of these issues. Google later established a stronger result with Gemini 4 Neon resolving 39% of all bugs in SWE-Sweep using their Antigravity harness. In both cases, these wins are accomplished by very large models spending huge numbers of tokens.
However, we find that small models augmented by Sphinx can outperform large frontier LLMs on SWE-Sweep.
The dramatic difference in performance between different baseline models is explained primarily by agent swarms. Gemini in Antigravity creates multiple subagents to explore for bugs. On the other hand, we did not observe this behavior with Anthropic models in Claude Code or OpenAI models in Codex. Likewise, Google noticed significantly worse performance when running Gemini models in the mini-swe-agent harness, which did not elicit swarming behavior.
To test our post-training on a level playing field, we encouraged tested agents to create swarms. This allows us to isolate the impact of post-training.
On the set of 70 bugs in the Mongoose repository:
GPT-6 Luna + Sphinx resolved 46 bugs at a cost of $71, compared with 23 bugs resolved by GPT-6 Astra for $543. That is twice the performance at an 87% reduction in cost.
Our best run with GPT-6.2 Sol resolved 51 bugs while consuming $332 in token spend. This is, to our knowledge, the highest accuracy achieved on this benchmark.
Notably, the delta in performance between Sol and Luna is relatively small, indicating that our post-training captured most of the nuances needed for agents to succeed on this task.
Baseline Design
Naive baselines, like prompting a Codex agent to “find all bugs,” provide an overly pessimistic view of agentic performance on SWE-Sweep, because most agents tend to give up too soon.
Bug-finding is a natural application for an agent swarm, and indeed we often found that on occasion, swarm-enabled harnesses like Codex and Claude Code spun up subagents to hunt for issues. To get a fairer comparison of agent performance in a swarm setting, we actively instructed agents to use subagents to find and quash bugs. Our baseline was therefore an unmodified Codex, Claude Code or Antigravity harness, prompted to use swarms to resolve bugs on the given repo.
Our Approach
Sphinx learns potentially useful information by training on information like code repos, and injects prompts into agents at inference time to steer behavior. In this process, we often discover conflicting information when training. Typically, these “controversies” get flagged for human review, which enables us to collect more training data to improve agentic understanding of complex scenarios.
In this case, rather than asking a human for input, we simply provided agents with the un-adjudicated “controversies”. In theory, the same issues that throw our training off may be indicative of bugs in software: documentation disagrees with implementation, a function implementation disagrees with a usage pattern in another file, or multiple functions fail to work together as expected.
We train using only the code and documentation present in the SWE-Sweep repository. At inference time, we use Sphinx’s inference in a standard Codex harness, and prompt agents to use subagents as in the baseline. The central “orchestrator” agent evaluated and reconciled edits made by its subagents to arrive at a final set of fixes
Results
Sphinx creates a new, high performance frontier for SWE-Sweep, Pareto-dominating models like GPT Astra. However, we find that even small, low-effort runs of Sphinx tend to cost much more than much larger unmodified models.
We attribute this to the fact that training teaches the underlying models enough about the codebase that they know where issues may exist, and therefore are able to be more aggressive in making fixes. On the other hand, out-of-the-box models are quick to give up after catching the obvious bugs.
An example: document bulk saving
As an example of how training helps agents find bugs, consider the function Model.bulkSave(documents, options) which saves an array of existing Mongoose documents by interleaving insert/update operations based on document contents, then submitting the batch to Model.bulkWrite(). Users can also attach a pre-save hook that fires before the save occurs.
The bug here: the function determines what to write first and then runs the hook, so changes made by the hook are not saved.
The test cases for a file called model.js indicated that a save should preserve changes made by pre-save hooks, and this nuance was captured by Sphinx during training. However, when Sphinx later trained on the implementation of this function, it found a controversy – typically, this is when we’d flag the issue for human review (and ensure agents defer on this point until human feedback is collected). That request for human input is expressed in natural-language:
Notably, this example exactly lays out the bug, so when our agents are tasked with fixing issues, they have already learned enough about the codebase to act with precision. The task is made simple both because the model can pinpoint where attention is needed and understand the rest of the codebase well enough to make a fix.
Where Sphinx's wins come from
We classified each of the bugs in SWE-Sweep into three primary categories, based on the information needed to detect the issue: Same-Function bugs (35% of issues) are issues fully localized to a single function, and can be resolved just by considering that one function’s faulty implementation. Misimplementation bugs (21%) occur when correct behavior is accurately described in documentation, but a single function implements something different. Finally, Cross-Function bugs (44%) require information gleaned from at least two functions to resolve the issue.
Compared to baselines, Sphinx’s post-training wins are most dramatic across Cross-Function bugs. Somewhat as expected, by baking in understanding of the entire codebase up-front, Sphinx agents can connect the dots between diverse functions when debugging.
Next steps
On Mongoose, Sphinx’s largest gains came on bugs whose fixes spanned multiple functions. We’re expanding our evaluation to more SWE-sweep repositories to see whether that pattern holds and how the cost per resolved bug varies across codebases.
We also want to test how training can be improved for swarm-based workflows. In the Mongoose runs, the coordinator and every subagent received the same adaptation from Sphinx. Moreover, Sphinx’s training was not optimized for swarms – we used the exact same process we’d use for a model powering a single-threaded agent. While generating and evaluating swarm rollouts is expensive, we hypothesize that we may be able to get further wins by post-training models to not just understand the system they’re working in but how to interoperate more effectively.