One is a $20-a-month Anthropic agent that indexes your repository on its own. The other is free, open source, runs on any model you like, and commits every change to git. We ran both across a 61-file Python service.
by Anthropic
Winneropen source · Apache-2.0
Claude Code is the stronger terminal agent in 2026; Aider is the one to choose when cost, model freedom or git discipline matter more than autonomy. We ran both across the same 61-file FastAPI and SQLAlchemy service with 340 pytest tests. Claude Code (Opus 5, Claude Pro at $20 a month) completed a deprecated-helper migration at 48 of 48 call sites and got the suite to 340 passing after explaining three real failures it had introduced. Aider found 41 of 48 call sites in its first pass, because seven of them hid behind a dynamic import loader it could not see, and needed a second pass to reach 47. Where Aider won was everything around the change: its test-driven loop fixed three failures across two unattended rounds and committed each attempt with a message naming the failing test, it runs on any model including a local one for nothing, and it costs a subscription price of zero.
The split follows the size of the repository and the size of your budget. Choose Claude Code when the job is repo-wide and an incomplete edit is worse than a slow one; choose Aider when you edit a handful of files you already know, need the work to be free, or want every AI change to be its own revertable commit.
From September 30 to October 4, 2026 both agents worked in the same checkout of a 61-file Python service: FastAPI with SQLAlchemy and Alembic, 44,000 lines, and 340 pytest tests that all passed before we started. Claude Code ran on the Claude Pro plan at $20 a month with Opus 5 and no CLAUDE.md written by us. Aider ran from a clean install with its default auto-commit behaviour left on, first against the Anthropic API and then, for the cost comparison, against a local 32B model served by Ollama. Each task was asked once in identical wording; where an agent needed a second pass we recorded the pass rather than the fix. A task counted as complete only when the test suite passed.
| Metric | Claude Code (Opus 5) | Aider |
|---|---|---|
| Task 1 — call sites converted, first pass | 48 of 48 ✓ | 41 of 48 |
| Task 1 — tests passing when the agent stopped | 340 of 340 ✓ | 340 of 340, after we named the missed directory |
| Task 2 — suite run after every edit | When asked to | Yes, unattended ✓ |
| Task 2 — failures fixed without intervention | 2 of 3 | 3 of 3 across two rounds ✓ |
| Task 2 — one revertable commit per change | Only when requested | Default behaviour ✓ |
| Task 4 — ran the migration on a local model | No — Anthropic models only | Yes, 32B via Ollama, $0 in API spend, 39 of 48 call sites ✓ |
| Winner | 🏆 Claude Code — migration completeness, repo awareness, guardrails | Aider — test-driven loop, git discipline, cost and model freedom |
Side-by-side breakdown across key categories
| Feature | Claude Code (Opus 5) | Aider | Winner |
|---|---|---|---|
| Shape | Terminal agent with its own repository indexing | Terminal pair programmer with a tree-sitter repo map | Tie |
| Models available | Anthropic models only (Opus 5, Sonnet 5) | Any model — Anthropic, OpenAI, Gemini, DeepSeek, local via Ollama | Aider |
| Works offline / on a local model | No | Yes | Aider |
| Finds files by itself | Yes — searches and reads the repository on its own | Partly — a repo map covers the common case, dynamic imports stay invisible | Claude Code (Opus 5) |
| 48-call-site migration, first pass | 48 of 48 | 41 of 48 | Claude Code (Opus 5) |
| Commit behaviour | Commits on request | One commit per change by default, each revertable | Aider |
| Behaviour on a vague destructive request | Asked for clarification | Acted on its own interpretation | Claude Code (Opus 5) |
| Best when | The change is wide and an incomplete edit is expensive | The change is narrow, or the budget is zero | Tie |
| Cost component | Claude Code (Opus 5) | Aider |
|---|---|---|
| Software | $20/mo Claude Pro; usage limits apply | $0 — open source, Apache-2.0 |
| Our 48-call-site migration | Included in the $20 subscription | Under $12 of token spend on the Anthropic API |
| Cheapest possible run | Free tier of the Claude apps, not of the agent | Local model via Ollama — $0, still 39 of 48 call sites |
| Heavy use | Max plans for substantially higher limits | Scales with tokens, not seats; swap to a cheaper model per run |
| Model choice | Anthropic only | Any hosted model, or a local one |
Claude plans are priced on anthropic.com and Aider is distributed from aider.chat with no commercial licence; the token rates are the providers’ published API prices as checked in October 2026. The comparison that matters is not $20 against $0 — Aider still spends tokens — but what happens at volume: Aider’s bill grows with usage on whichever model you point it at, while Claude Code’s is fixed until you hit a usage ceiling. Our method is documented on the How We Evaluate page.
This one splits along the axis of autonomy against control. Claude Code does more of the work without being supervised and gets wide changes right; Aider keeps you in charge, costs nothing to own, and produces the cleanest git history we have tested.
48 of 48 call sites in one pass, 340 tests passing, and it found the definition and every call site by itself — the one to pay for when a missed file costs more than a slow run.
Free to own, any model you like, and under $12 of tokens for a 48-call-site migration — nothing but electricity on a local model.
One revertable commit per change, each naming what changed, by default — the only agent we have used where reviewing AI work is a normal git log.
Two approval stops before shell commands, and when we said “clean this up” it asked which files we meant — which matters the first time an agent can write to a shared repository.
Claude Code finished the wide migration in one pass and indexed the repository unaided; Aider is free, runs on any model including a local one, and commits every change so you can undo it. Both are terminal tools, so the only thing you risk is an afternoon — run the migration prompt above on your own codebase before you decide.
Still deciding? Check out these related comparisons and best-of guides.