Back to guides
Coding agents·September 21, 2026·9 min read

mini-SWE-agent vs Claude Code: workflow, models and total cost

One is a free MIT harness you can point at any model LiteLLM reaches, the other only speaks Anthropic's protocols — the differences that actually decide a migration.

Last reviewed on .

mini-SWE-agent and Claude Code are not two versions of the same product: mini is a free MIT-licensed Python agent with one tool — bash — that reaches any model through LiteLLM, and Claude Code is Anthropic's proprietary agent that only speaks Anthropic-shaped protocols. That single difference decides most migrations, because it is a protocol boundary rather than a preference. Pick mini when you want a harness small enough to read and a free choice of provider; pick Claude Code when you want the editor, desktop and CI surfaces, the permission modes and the subscription path, and you are staying on Claude models.

mini-SWE-agent is maintained in the SWE-agent GitHub organisation and describes itself as "Built by the Princeton & Stanford team behind SWE-bench, SWE-agent, and more". Before anything else, a correction, because the most-quoted fact about it is out of date. Its v2 migration guide states that "v2.0 uses native tool calling by default (instead of regex-based text parsing)", while the project's own FAQ still says "it doesn't even use the tool-calling interface of the LMs" and that "Actions are parsed from triple-backtick blocks". Both pages were read on September 19, 2026. The migration guide and the shipped configuration win: mini.yaml tells the model that "Every response needs to use the 'bash' tool at least once to execute commands." Any tutorial built on the no-tool-calling line, or on the removed MSWEA_MODEL_API_KEY variable, predates v2.

Which one should you pick

Choose mini-SWE-agent if your work is batch-shaped or provider-shaped: running the same prompt over many issues, evaluating models against each other, or working inside a sandbox where an agent small enough to audit beats a feature set you cannot inspect. Its execution model is the deciding property: mini's FAQ describes actions as running through subprocess.run, where "every action is completely independent (as opposed to keeping a stateful shell session running)", so "the agent cannot change directories or export environment variables; however environment variables can be set per-action". The shipped mini.yaml tells the model the same thing — "Directory or environment variable changes are not persistent. Every action is executed in a new subshell" — and points it at a prefixed command instead. That makes runs reproducible and trivially containerisable, and it makes long stateful shell work awkward. Migration cost is one afternoon: pip install mini-swe-agent, one YAML file, one key.

Choose Claude Code if the value is in the surfaces and the guard rails. Anthropic describes it as available "in your terminal, IDE, desktop app, and browser", and notes that "The Terminal CLI, VS Code, and JetBrains also support third-party providers" — so a gateway route only exists on some of them. It carries permission modes, subagents, MCP servers, hooks and plan mode, and on a Pro or Max subscription your usage draws on a plan allowance instead of a per-token bill. The cost is lock-in of a specific kind: you cannot take it off Claude models, and Anthropic's gateway documentation states that it "doesn't support routing Claude Code to non-Claude models through any gateway".

Switching from Claude Code to mini means giving up the permission system in exchange for mini's three modes, giving up the IDE and desktop surfaces entirely, and taking on your own spend accounting — mini's per-run budget only works when LiteLLM can price your model id. Switching from mini to Claude Code means giving up free model choice, and moving from a harness you can read to a bundled binary: the claude-code repository is a distribution point, and its license file is a one-line notice — "© Anthropic PBC. All rights reserved" — with use subject to Anthropic's Commercial Terms of Service.

The two agents side by side

Propertymini-SWE-agentClaude Code
LicenseMIT, © Kilian A. Lieret and Carlos E. JimenezProprietary — "All rights reserved", under Anthropic's Commercial Terms
Current release2.4.6, uploaded July 23, 2026 (PyPI)2.1.277 on the latest tag and 2.1.267 on stable when the npm dist-tags were read; the latest tag moves most days
RuntimePython 3.10 or newerNode 22 or newer for the npm package
SurfacesTerminal mini REPL, plus the mini-extra companion commandTerminal, IDE extensions, desktop app and browser
Tools available to the modelbash, and nothing elseFile edits, search, command execution, subagents, MCP servers, hooks
Execution modelOne independent subprocess.run per action; no shell state carries overStateful session with permission modes
Approval flowStarts in confirm; switch to yolo (/y) or human (/u) mid-run; -y starts unconfirmedPermission modes, including plan mode before implementation
Model accessAny provider LiteLLM reaches, including OpenAI-compatible gatewaysClaude models over Anthropic Messages, Bedrock or Agent Platform formats only
Per-run spend capcost_limit: 3. in the shipped config; -l/--cost-limit, 0 disables--max-budget-usd, print mode only
Turn capstep_limit: 0 — unlimited by default--max-turns, print mode only

Sources read September 19, 2026: mini's PyPI metadata, Claude Code's npm registry document, mini's CLI page, mini's shipped mini.yaml, and Anthropic's CLI reference and overview.

Why "mini beats Claude Code" is not a verdict

mini's homepage carries a news line reading "mini-swe-agent beats Claude Code and Codex on DeepSWE", and it is worth reading what DeepSWE actually measured. Its write-up states: "Every run uses mini-swe-agent, the harness the SWE-bench authors built. We hold it fixed across every model so the leaderboard reflects model capability, not the scaffolding around it." The leaderboard is therefore a ranking of models inside mini, not a ranking of mini against other agents.

The one harness-versus-harness comparison in that work is a pilot over "the same 10 SWE-Bench Pro tasks", on which the standardised harness matched or beat the native ones at comparable token cost — and whose authors immediately caution that "Some of that gap is likely prompt-tuning rather than capability". Ten tasks across a handful of models is not a sample that can rank two agents, and no other credible head-to-head at a usable size was found while researching this page. This guide therefore does not score them. It compares what is checkable: protocol, permissions, spend controls and migration cost.

The key question: which endpoints each one can reach

This is where the two diverge hardest, and it is the part that decides whether a gateway is even an option.

Claude Code is protocol-locked. Anthropic's gateway compatibility guide lists three formats: Anthropic Messages selected by ANTHROPIC_BASE_URL and calling /v1/messages plus an optional /v1/messages/count_tokens; Amazon Bedrock InvokeModel; and Google Cloud's Agent Platform rawPredict. There is no chat-completions mode. The base URL is an origin, because Claude Code appends the route — the same rule Kunavo's own ANTHROPIC_BASE_URL page encodes.

Claude Code
# Claude Code speaks the Anthropic Messages format and appends the route
# itself, so the variable is the ORIGIN — not the /v1 URL mini wants.
export ANTHROPIC_BASE_URL=https://api.kunavo.com   # origin, no /v1
export ANTHROPIC_AUTH_TOKEN=sk-kn-...              # sent as Authorization: Bearer

claude --model claude-sonnet-5

Three consequences worth budgeting for. The credential variable decides the header: Anthropic's connect page states that "ANTHROPIC_AUTH_TOKEN in Authorization: Bearer, ANTHROPIC_API_KEY in x-api-key, and apiKeyHelper in both", and that a credential in the wrong variable "reaches the gateway in a header it doesn't read, and the request fails with 401". Prompt caching has no beta pairing and fails quietly: Anthropic's guide says a gateway that drops cache_control produces "No error: the conversation bills as uncached input on every turn". And model discovery is off unless you set CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1, after which Claude Code keeps only ids containing "claude" or "anthropic".

mini is protocol-free but configuration-heavy. There is no base-URL environment variable at all; its local models page explains that model_kwargs is passed straight through as litellm.completion(model=model_name, messages=messages, **model_kwargs). Keep the /v1 suffix here — the opposite of the Claude Code rule above. The same page's own example sets custom_llm_provider: "openai" on an unprefixed model name, so the openai/ prefix below is belt and braces rather than a requirement; what the page does insist on is that if you use either, "this must also match litellm_provider in the config".

kunavo.yaml
# mini has no base-URL environment variable. The endpoint goes in a config
# file, because model_kwargs is splatted straight into litellm.completion().
model:
  model_name: "openai/claude-sonnet-5"        # prefix and provider must agree
  model_kwargs:
    custom_llm_provider: "openai"
    api_base: "https://api.kunavo.com/v1"    # keep /v1 here
    drop_params: true                        # the shipped mini.yaml sets this too
  # set_cache_control is already "default_end" for a name containing "claude"

Supply the key as OPENAI_API_KEY, either in the environment or through mini-extra config set, which writes mini's .env; mini's global configuration page notes that "Environment variables take precedence over variables set in the .env file." Select the file with mini -c kunavo.yaml, or make it the default with MSWEA_MINI_CONFIG_PATH.

One quiet failure mode deserves its own fix. mini's per-run budget is enforced by LiteLLM's cost tracking, which needs to recognise the model id — and whether Kunavo's ids are priced in LiteLLM's registry was not checked for this page. Assume they are not, and supply the rates yourself rather than reaching for MSWEA_COST_TRACKING="ignore_errors", which removes the guard instead of repairing it. Point LITELLM_MODEL_REGISTRY_PATH at a file in LiteLLM's model-price format. mini's worked example keys the entry on the model name without its provider prefix and declares the provider in litellm_provider, which is the shape copied here:

litellm-registry.json · LITELLM_MODEL_REGISTRY_PATH
{
  "claude-sonnet-5": {
    "input_cost_per_token": 0.0000020000,
    "output_cost_per_token": 0.0000100000,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}

Two honest gaps. Kunavo has not runtime-tested either client against its endpoint, and publishing a setup reference is not a compatibility test. Specifically unverified: whether LiteLLM's openai/ path negotiates native tool calling — mini's v2 default — against Kunavo's chat-completions endpoint. If it does not, mini still ships the legacy text-parsing path as model_class: litellm_textbased with a mini_textbased.yaml config beside the default one. Keep a working route open while you try either client, and read what your account actually recorded for a bounded task.

What each one costs to run

The software prices are not comparable, because only one of them has a price.

Line itemPublished priceSource, checked September 19, 2026
mini-SWE-agent, the software$0, MITPyPI package metadata; no plan or hosted tier is offered on its site or listing
Claude Free$0 — Claude Code not includedclaude.com/pricing
Claude Pro$17/month on annual billing ($200 up front), $20 billed monthly — Claude Code includedclaude.com/pricing
Claude MaxPricing card reads "From $100 Per month"; the support article gives Max 5x at $100/month and Max 20x at $200/monthMax plan support article — monthly billing only
Either agent on metered tokensYour provider's per-token rateYour own account

The pricing card and the support article describe the Max tiers differently — one collapses them into a single "from" figure, the other names both. Confirm the tier and total in checkout before you budget it. Team and Enterprise seat prices are left out here on purpose: they are a seat decision for an organisation rather than the single-developer choice this page is about.

For metered usage, Anthropic publishes an envelope rather than a per-task number: "Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users" (cost management docs). That is an aggregate over Anthropic's own deployments, not a measurement of either agent against the other, and no equivalent figure exists for mini.

A worked token estimate

This is illustrative token arithmetic, not a measured task cost and not a bill ceiling. Both agents re-send the conversation each turn — Anthropic's own docs state that "Claude Code sends your full conversation with every request, and each time Claude uses tools it sends another request carrying that batch of tool results" — so input dominates. Assume one bounded task totalling 600k uncached input tokens across its turns and 25k output tokens. Rates are live Kunavo catalog prices per million tokens.

ModelInput / output per 1MEstimate for the assumed taskReachable from
Claude Haiku 4.5$0.40 / $2.00$0.29Both clients
Claude Sonnet 5$2.00 / $10.00$1.45Both clients
Claude Opus 5$2.00 / $10.00$1.45Both clients
Gemini 3.8 Flash$0.525 / $2.625$0.38mini only — Claude Code has no chat-completions mode

Read it as a ratio, not a forecast. Under these assumptions the spread between Claude Haiku 4.5 and Claude Opus 5 is about 5.0×, which is a bigger lever than the choice of client. Note also that the cheapest listed rate and the lowest cost to finish the task are different claims: a cheaper model that needs three attempts can cost more than one that lands first time, and mini's independent-subprocess loop re-sends more context when a step fails. Caching changes the picture again, and not in the direction most write-ups assume. Claude Code attaches cache_control markers itself. mini also sets set_cache_control: "default_end" on its own, but only for some model names: its model selection code applies that default when the resolved model name contains anthropic, claude, sonnet or opus and the config has not already set the key. A Claude-named id — including the prefixed openai/claude-sonnet-5 above — therefore gets markers without you asking; a Gemini-named id does not. Whether a chat-completions endpoint acts on those markers was not tested for this page. See prompt caching.

Kunavo's catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. Cache charges and external tools sit outside this example. The minimum top-up is $10 in prepaid credit — a funding minimum, not a task fee or a subscription. See billing details, and note that Claude Code's own /usage figure is "computed locally from token counts at list price" and is explicitly "an estimate", so reconcile against your provider's ledger rather than the client's readout.

One more disambiguation: SWE-agent is not mini-SWE-agent

The older sibling still ranks for these queries and shares an organisation, a README family and a benchmark lineage — but it has different config syntax, different docs and no place in a mini tutorial. Its own maintainers have moved on: the SWE-agent README states that "Most of our current development effort is on mini-swe-agent, which has superseded SWE-agent" and recommends mini going forward (read September 19, 2026). It is not archived, and the project is MIT licensed, so treat it as maintained-but-superseded rather than dead — and start new work on mini.

Setting up either one

Kunavo publishes a configuration reference for Claude Code and none for mini-SWE-agent; neither client has been runtime-tested here, and a published setup page is not a compatibility test. If Claude Code is your client, start at the Claude Code integration guide and create a Kunavo account when you are ready to fund a key. If you are weighing the subscription against metered tokens first, Claude Code pricing and Claude Code without a subscription cover that decision, and the best API for Claude Code compares the routes. For mini, the pattern is the generic one described in OpenAI-compatible API. Comparing other terminal agents instead? OpenCode vs Claude Code and Aider pricing cover two more clients with the same split between a free harness and a metered model bill.

FAQ

Is mini-SWE-agent better than Claude Code?

No published evidence settles that, and the headline people quote does not say it. mini's own site links a DeepSWE result under the words "mini-swe-agent beats Claude Code and Codex on DeepSWE", but DeepSWE states that "Every run uses mini-swe-agent, the harness the SWE-bench authors built. We hold it fixed across every model so the leaderboard reflects model capability, not the scaffolding around it." The only harness-versus-harness comparison in that work is a pilot on the same 10 SWE-Bench Pro tasks, and its authors write that some of the gap is "likely prompt-tuning rather than capability". Ten tasks cannot rank two agents. Decide on workflow, protocol and cost path instead.

Can mini-SWE-agent use Claude models through a gateway like Kunavo?

Yes, by configuration rather than by an environment variable: mini has no base-URL variable, and its documentation says model_kwargs "is directly passed to litellm.completion". Put custom_llm_provider: "openai" and api_base: "https://api.kunavo.com/v1" under model.model_kwargs in a YAML file, keep the /v1 suffix, supply OPENAI_API_KEY, and select the file with mini -c. A provider prefix on the model name is optional — mini's own example sets custom_llm_provider on an unprefixed name — but whichever you use has to match litellm_provider. Two things to know before you rely on it: mini's default configuration uses native tool calling, and no runtime test of that path against Kunavo has been performed here; and litellm has to recognise the model id for cost tracking — the mechanism behind mini's default $3 per-run budget — to work at all.

Can Claude Code talk to an OpenAI-compatible endpoint?

No. Anthropic's gateway compatibility guide lists three API formats a gateway can expose to Claude Code: Anthropic Messages via ANTHROPIC_BASE_URL (calling /v1/messages and optionally /v1/messages/count_tokens), Amazon Bedrock InvokeModel via ANTHROPIC_BEDROCK_BASE_URL with CLAUDE_CODE_USE_BEDROCK=1, and Google Cloud's Agent Platform rawPredict via ANTHROPIC_VERTEX_BASE_URL with CLAUDE_CODE_USE_VERTEX=1. Microsoft Foundry and the Claude Platform on AWS get their own variables on that page, but the guide says both implement the same Anthropic Messages format. There is no /v1/chat/completions mode in the list, so an OpenAI-shaped endpoint is unreachable from Claude Code. Anthropic's Other LLM gateways page also states that it "doesn't support routing Claude Code to non-Claude models through any gateway."

How much does mini-SWE-agent cost?

The software is free. mini-swe-agent is MIT licensed, with copyright held by Kilian A. Lieret and Carlos E. Jimenez, and neither its documentation nor its PyPI listing offers a hosted tier, plan, seat or account to buy — the current release on PyPI is 2.4.6, uploaded July 23, 2026, requiring Python 3.10 or newer. What you pay is the model bill from whichever provider you point it at. The only spend guard shipped in the default configuration is cost_limit: 3. per run, alongside MSWEA_GLOBAL_COST_LIMIT and MSWEA_GLOBAL_CALL_LIMIT, which both default to 0 meaning no limit. Treat those as configured ceilings, not as observed costs.

Does mini-SWE-agent still avoid tool calling and parse triple-backtick blocks?

Not by default, and this is the fact most third-party write-ups get wrong. The v2 migration guide states that "v2.0 uses native tool calling by default (instead of regex-based text parsing)", and the shipped mini.yaml is tool-call shaped — its error template tells the model that "Every response needs to use the 'bash' tool at least once to execute commands." The project's own FAQ still carries the older line that "it doesn't even use the tool-calling interface of the LMs", so the two pages disagree; the migration guide and the shipped config are the current behaviour. Text parsing survives as an opt-in through the litellm_textbased model class and the mini_textbased.yaml config that ships beside mini.yaml.

What does Claude Code lose when it points at a third-party endpoint?

Anthropic documents several reductions, across its Other LLM gateways page and its gateway compatibility guide. While a gateway credential variable or apiKeyHelper is active, "a developer's claude.ai subscription isn't used: the credential replaces the subscription login for that session", and the traffic is billed per token to whoever owns that credential. Gateway model discovery is off unless CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 is set, and it keeps only ids containing "claude" or "anthropic". Fine-grained tool streaming is off by default behind a custom base URL. Setting ANTHROPIC_BASE_URL alone, with no credential variable, does not replace the subscription — the saved login stays active and its limits still apply.

Checked September 19, 2026 by fetching each source directly: mini-SWE-agent's PyPI metadata, its homepage, v2 migration guide, FAQ, CLI, global-configuration and local-models pages, its shipped mini.yaml, run/mini.py and models/__init__.py on the main branch; Claude Code's npm registry document, its repository license file, and its overview, gateway, gateway-protocol, gateway-connect, cost and CLI-reference docs; claude.com/pricing and the Max plan support article; the SWE-agent README; and the DeepSWE write-up. No runtime test of either client against Kunavo was performed, and no benchmark result on this page was reproduced. Kunavo token rates come from the live catalog, and every dollar example here is illustrative token arithmetic.