AI & DevelopmentOpen SourceDeveloper Tools

mini-swe-agent: 100 Lines That Beat Claude Code on SWE-bench

mini-swe-agent bash terminal showing minimal AI coding agent beating complex frameworks on SWE-bench benchmark

The Princeton and Stanford team behind SWE-bench shipped a coding agent in roughly 100 lines of Python that scores over 74% on SWE-bench Verified. When tested head-to-head against more complex agent scaffolding running the same frontier model, it beats Claude Code’s framework by six percentage points. That is the entire pitch for mini-swe-agent, and it lands.

One Tool: Bash

mini-swe-agent’s architecture can be described in one sentence: it runs a bash loop. The agent has no custom tools beyond subprocess.run, no tool-calling interface, no stateful shell session, and no model-specific instructions. Every action is independent. Every step appends to a flat message list, making the trajectory identical to what the model sees — a property that makes it trivially debuggable and straightforward to use as a fine-tuning dataset.

This is not minimalism as a constraint. It is minimalism as a deliberate design argument. The team built mini-swe-agent explicitly to test whether scaffold complexity was responsible for agent performance, or whether the model was doing all the real work. The answer, in benchmark form, is the latter.

What SWE-bench Actually Tests

SWE-bench Verified is a set of 500 real GitHub issues drawn from 12 popular Python repositories — Django, Flask, scikit-learn, and others. An agent must read the issue, navigate the full codebase, produce a multi-file patch, and pass unit tests and regression tests without any human guidance. It is not HumanEval, where most frontier models score above 90% on isolated function completions. SWE-bench is the benchmark where the rubber meets the road.

For context: Claude Mythos 5 leads the SWE-bench Verified leaderboard at 95.5%. Claude Fable 5 follows at 95%. mini-swe-agent is not competing at that tier. It is competing at the scaffolding tier — and at that tier, it wins.

The Number That Should Make Framework Authors Uncomfortable

When the same model — Claude Opus 4.7 — is run through different agent scaffolds, here is what the benchmarks show:

  • mini-swe-agent: 68.3%
  • Hermes Agent: 64.6%
  • Claude Code scaffolding: 62.2%

That six-point gap between mini-swe-agent and Claude Code’s scaffolding is not noise. And the scaling story is worse for complex frameworks: when model quality improves from Opus 4.5 to Opus 4.7, mini-swe-agent captures +11.5% of that uplift. Claude Code captures only +6.1%. The simpler scaffold scales better as models get stronger.

The research conclusion is blunt: the bottleneck is the model’s ability to reason about code, not the harness around it. Complex scaffolding adds cognitive overhead without proportional benefit — and in some cases, rigid execution harnesses actively cap the scaling potential of high-capability models.

Who Is Already Using It

This is not a weekend project that only works for its author. Meta, NVIDIA, Essential AI, IBM, Nebius, and Anyscale have deployed mini-swe-agent in production. Princeton and Stanford use it as a research baseline. The agent’s linear history and model-agnostic design make it well-suited for both production automation and fine-tuning pipelines — two very different use cases it handles without modification.

Getting Started

Install via pipx:

pipx install mini-swe-agent
mini

Or run without installing:

pipx run mini-swe-agent

The first run prompts for model configuration. The agent is model-agnostic — works with Claude, OpenAI, or local models via LiteLLM. Point it at a GitHub issue URL, a local directory, or use it interactively in your terminal. Full documentation is at mini-swe-agent.com.

What This Means If You Are Building Agents

The industry has spent two years building richer agent scaffolding under the assumption that more structure means better results. mini-swe-agent’s benchmarks challenge that directly. This does not mean Claude Code or Cursor are the wrong choice — for complex multi-file workflows, long-running sessions, and IDE integration, their architecture is appropriate. But for focused coding tasks, the evidence now suggests that a lean agent with a capable model outperforms a heavy framework with the same model.

The practical takeaway: before adding another tool, another orchestration layer, or another MCP server to your agent stack, ask whether the benchmark data supports it. If you cannot show that added complexity improves outcomes, mini-swe-agent’s performance is the argument for not adding it.

Start minimal. Add complexity when you can prove it helps. The SWE-bench team just proved, with numbers, that this approach is not a compromise. It is a strategy.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *