mini-swe-agent: The 100-Line AI Agent That Beats Claude Code on Some Benchmarks Researchers behind SWE-bench and SWE-agent at Princeton and Stanford released mini-swe-agent, an MIT-licensed open-source coding agent whose core is roughly 100 lines of Python and whose only tool is bash. The agent scores above 74% on SWE-bench Verified and outperforms Claude Code and Codex on the DeepSWE benchmark, and it is now used by Meta, NVIDIA, IBM, Nebius, Anyscale and Ramp, among others. Its design relies on three choices: bash-only actions, no stateful shell session (each command runs independently via subprocess.run), and a fully linear message history. Most coding agents are built like skyscrapers. Layers of tooling, custom interfaces, plugin systems, and configuration files stacked on top of each other. The team behind SWE-bench asked a different question: what if the agent was 100 times simpler and still worked almost as well? The answer is mini-swe-agent. It is roughly 100 lines of Python for the core agent, has no tools except bash, scores above 74% on SWE-bench Verified, and beats Claude Code and Codex on the DeepSWE benchmark. I spent a week with it. Here is what I found. mini-swe-agent is an open-source coding agent from the Princeton and Stanford researchers who built SWE-bench and SWE-agent. The project is MIT licensed and sits at around 10.2k stars on GitHub. The core idea is radical subtraction. The agent has no tools other than bash. It does not use the model's tool-calling interface at all. It just writes shell commands and runs them. That means it works with literally any model, because every model can write text that looks like a shell command. The agent class is about 100 lines of Python. Add a bit more for the environment, model wrapper, and run script, and you have the whole system. There is no giant monorepo of dependencies. No custom YAML schema to memorize. No plugin marketplace to navigate. That is the pitch: a hackable tool you can understand at a glance, not a black box. Three choices make mini-swe-agent interesting. First, bash only. Instead of building custom tools for every action the agent might take, the team lets the model use the shell to do anything. Want it to open a pull request? You tell the model to figure it out with the gh CLI. You are not waiting for someone to implement an "open PR" tool. Second, no stateful shell session. Every action runs through subprocess.run , which means each command is completely independent. The team calls this a big deal, and it is. It makes sandboxing trivial: swap subprocess.run for docker exec and the agent runs in a container. It also makes scaling to many parallel evaluations much easier. Third, a completely linear history. Every step appends to the messages array and nothing else. There is no difference between the trajectory and what the model sees. That makes debugging and fine-tuning straightforward, because you can read exactly what the model was prompted with at every step. The numbers are what make this more than a curiosity. mini-swe-agent scores above 74% on SWE-bench Verified. It beats Claude Code and Codex on DeepSWE. It now powers Ramp's SWE-Bench implementation. That performance comes from the model, not the scaffold. The whole point of the project is to put the language model at the center and get the agent harness out of the way. If a model is good at coding, a thin wrapper lets it show that without layers of tooling distorting the result. The team also ships ProgramBench, a harder benchmark for evaluating agents. And they use mini-swe-agent as a baseline system on the SWE-bench bash-only leaderboard, where different models run through the same minimal harness. The README lists an unexpected set of adopters: Meta, NVIDIA, IBM, Nebius, Anyscale, Essential AI, Princeton University, and Stanford University. That tells you something. This is not a toy project that only researchers care about. Large organizations are using it because it is easy to deploy, easy to sandbox, and easy to modify. If you are doing fine-tuning or reinforcement learning and you do not want to overfit to a specific agent scaffold, a 100-line agent is exactly what you want. For a solo developer, the appeal is different. You can read the entire agent in an afternoon. If something behaves strangely, you know where to look. That is rare in a world of opaque agent frameworks. You can try it in one line. uvx mini-swe-agent installs it in an anonymous virtual environment and runs the CLI. Or pip install mini-swe-agent and type mini . It supports local environments, Docker, Podman, Singularity, Apptainer, Bubblewrap, and more. Models work through LiteLLM, OpenRouter, Portkey, and other providers. There is a trajectory browser for inspecting what the agent did and Python bindings if you want to embed it in your own code. Compare that to the setup ceremony of some enterprise agent platforms and it feels almost unfair. I ran the CLI on a small Python repository with a deliberately broken function. The command starts a conversation where the agent writes a shell command, sees the output, and writes the next command. That is the whole loop. There is no elaborate plan mode, no sub-agent spawning, no context management UI. The agent reads files with cat , searches with grep , edits with a patch command, and runs the test suite with pytest . Watching it work is like watching a competent developer at a terminal. The speed difference from Claude Code is noticeable. Because there is no heavy scaffold to initialize and no complex tool schema to negotiate, the agent starts almost instantly. For quick tasks where I just want a fix, that matters. The linear history also means you can read the whole transcript and understand exactly what the model saw. When the agent made a wrong turn in my test, I could pinpoint which output had confused it. That kind of debuggability is rare. Keeping a stateful shell session seems convenient, but it creates hidden state. A working directory changes, an environment variable gets set, a background process keeps running. The next command inherits all of that, and the agent has to track it. By running each action as a fresh subprocess, mini-swe-agent removes that hidden state entirely. Every command is independent. If you want to run it in a sandbox, you change one function. If you want to run fifty evaluations in parallel, each one is isolated by construction. That is why research teams care about this project. It is not trying to be the most convenient agent for a single developer. It is trying to be the cleanest possible substrate for running language models on software tasks at scale. The minimalism is a feature, but it is also a limitation. There is no polished desktop app. No rich editor integration. No fancy UI for managing sessions. If you want an agent that lives in your IDE with a sidebar and clickable approvals, this is not it. Bash-only also means you are trusting the model to express complex operations as shell commands. For simple tasks that is fine. For intricate refactors across a large codebase, a model with structured tools and a richer interface may do better. The project is at v2.4.6, and there is a migration guide from v1. That means the API has changed in the past and may change again. If you bet your workflow on it, expect to do some maintenance. mini-swe-agent will not replace Claude Code for everyone. Claude Code is more polished, more integrated, and better at holding your hand through complex work. If that is what you need, keep using it. But mini-swe-agent is the best proof I have seen that the agent scaffold matters less than people think. A 100-line agent with bash access, a linear history, and a good model behind it can score above 74% on a serious benchmark. The complexity in most agents is not a requirement. It is a choice. If you are a developer who likes understanding your tools, a researcher running evaluations, or a team that wants a simple, deployable baseline, mini-swe-agent deserves a serious look. Have you tried a minimal agent, or do you find the extra tooling in full agents actually worth it? Drop a comment. I'll read every single one.