Aider or opencode: which terminal agent to choose
Both live in the terminal and connect to third-party models, but they are built differently: aider drives git for you, opencode is closer to an agent workbench.
6 min · · сравнение · агенты
If you are choosing between two terminal coding helpers, the query aider vs opencode comes up almost at once. Both work in the terminal, both are open, and both connect to models from different vendors. But they do it differently, and the difference is felt the very first evening. Below is a comparison on what can be checked in the docs: edits and git, working modes, MCP and extensibility, connecting your own models, and the cost of one session.
Information on aider comes from the aider.chat/docs documentation and on opencode from opencode.ai/docs, as of October 18, 2026. We do not rate the quality of the models or the tools themselves: that depends on your task, so test on it.
Aider: what it is
Aider describes itself as AI pair programming in your terminal. You start it in a repository directory, add files to the chat and ask for changes. The central idea is tight work with git, covered below. The docs have a separate Repository map section, so the tool builds an overview of the repository to help the model know what lives where. We do not retell the implementation details; open the section yourself.
Installation from the docs: python -m pip install aider-install, then aider-install.
opencode: what it is
opencode is an open-source agent whose main interface is text-based, with a desktop app and an IDE extension as well. Its strengths per the docs: Plan and Build modes, built-in and custom agents and subagents, a permission system, MCP servers, custom commands, and config in opencode.json. How to connect it to the gateway in a few minutes is described in opencode: connecting to the API gateway. Here we focus on the differences.
How each makes edits
Aider and git. This is the main difference. Aider commits every edit itself with a meaningful message. If a file has uncommitted changes, it first saves them as a separate commit so your edits do not mix with its own. Everything is undone with /undo, /diff shows changes since the last message, and /git runs arbitrary git commands. Commit messages follow Conventional Commits by default and are written by a "weak" model (--weak-model) that receives the diff. Commits get an "(aider)" attribution, which you can disable with --no-attribute-author and --no-attribute-committer. If auto-commits get in the way they can be turned off with --no-auto-commits, and you can drop git entirely with --no-git.
opencode. The agent edits files in the working directory, and rollback uses the /undo and /redo commands (per the docs: it reverts the changes and returns your message for editing). We found no auto-commits in the docs, so you manage git history yourself. In exchange there is a permission system: edits and each bash command can be set to allow, ask or deny, including by pattern (allow git status *, ask for the rest).
So if you want a commit after every step, aider does that out of the box. If you want to decide when to commit and strictly control which commands the agent may run, opencode is closer.
Modes and agency
Aider has several chat modes: code (makes edits), ask (discusses code without changing anything), architect (one model proposes a solution, another turns it into edits) and help. Modes are switched with commands like /chat-mode. The docs recommend a "discuss in /ask, then /code" flow. The two-model architect mode is handy when a strong model is needed only for the plan.
opencode is built around agents. The primary Build and Plan switch with Tab, and subagents (General, Explore, Scout) are called automatically or through @. You define your own agents in config or as a markdown file, each with its own model, permissions and step limit.
MCP and extensibility
In opencode, MCP servers (local and remote, with OAuth) are connected with the mcp block in config. Beyond that there are custom commands, plugins, custom tools and an SDK. In the aider documentation's table of contents at the time of checking we saw no MCP section, though it has aider scripting, editor integrations and linting with tests. If MCP is mandatory for you, check the current aider docs.
Connecting your own models
Both programs work with any OpenAI-compatible API.
Aider. The docs recommend environment variables and the openai/ prefix before the model name:
export OPENAI_API_BASE=https://api.zukko.pro/v1
export OPENAI_API_KEY=fetch_your_key
aider --model openai/claude-sonnet-5 --weak-model openai/deepseek-v4.1-flashFor models aider does not know, it prints warnings (the Model warnings section): that is normal, it just does not know their limits and parameters.
opencode. A provider block in opencode.json. For Claude, the Zukko opencode documentation recommends the built-in anthropic provider with baseURL https://api.zukko.pro/v1.
There is an important practical nuance about cache here. For Claude the gateway gives a cache discount only in the Anthropic format, while in the OpenAI format that aider uses all Claude input is billed at the input price. For GPT models cache reads are visible in both formats. So with aider through the gateway, for large cacheable contexts it makes more sense to look at GPT models than at Claude. For the cheap DeepSeek and GLM models a cache read costs the same as input, so caching does not change their price.
The price of the same session
Take a session of 1.5M input tokens and 150K output tokens, of which 1.2M input tokens repeat under caching. Zukko prices on October 18, 2026, $ per 1M tokens.
- opencode +
claude-sonnet-5in Anthropic format: fresh input 0.2M, cache read 1.2M, cache write 0.1M, output 0.15M. 0.2 × 0.4 + 1.2 × 0.05 + 0.1 × 0.5 + 0.15 × 2 = 0.08 + 0.06 + 0.05 + 0.3 = $0.49. - aider +
claude-sonnet-5in OpenAI format, all input at the input price: 1.5 × 0.4 + 0.15 × 2 = 0.6 + 0.3 = $0.90. - aider +
gpt-6.1-sol(0.27 / 1.32, cache read 0.013), 0.3M fresh input and 1.2M from cache: 0.3 × 0.27 + 1.2 × 0.013 + 0.15 × 1.32 = 0.081 + 0.0156 + 0.198 ≈ $0.29.
The cache split is illustrative, and for GPT the cache write is not billed separately. This illustrates the mechanics, not a forecast of your bill, and it does not say which model will solve the task better. Prices change; the current ones come from GET https://api.zukko.pro/v1/models.
Summary
| Aider | opencode | |
|---|---|---|
| Git | Auto-commit of every edit, /undo, /diff | You manage it, rollback via /undo and /redo |
| Modes | code, ask, architect, help | Build and Plan, subagents, custom agents |
| MCP | Not found in the docs table of contents | Local and remote servers, OAuth |
| Permissions | Via flags and confirmations | allow / ask / deny with patterns |
| Own models | OpenAI-compatible API, openai/ prefix | Providers in opencode.json, including Anthropic format |
| Interface | Terminal | Terminal, desktop, IDE extension |
What to pick
If you want a simple tool where every step becomes a commit and the chat is built around files, start with aider. If you need agents with roles, MCP, different models for different jobs and precise permissions, look at opencode. It is not a question of better or worse: install both, give each one small task and compare. You can create a key in the Zukko dashboard for the test, and the balance is shared between the two tools.
FAQ
Aider: what is it, briefly?
A terminal coding helper with tight git integration: it edits files on your request and commits each change.
Can both tools use the same key?
Yes. They are ordinary clients and share the key and balance. Only the address settings differ: aider via OPENAI_API_BASE with /v1, opencode via baseURL, also with /v1.
Which is cheaper to run?
It depends on the model and on whether the gateway sees the cache. The tool itself charges nothing; you pay for the tokens of the chosen model.
How do I stop aider from committing automatically?
Start it with --no-auto-commits, or disable git entirely with --no-git, but then take care of backups yourself.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- RAG or MCP: what is the difference and which to choose for giving a model dataRAG puts retrieved pieces into the prompt, MCP gives the model tools it calls itself. How they differ, what each costs and how to combine them.
- Claude Desktop or Claude Code: What Is the Difference and Which to PickThe desktop app and the console agent share one engine but sign in differently. We compare scenarios, model access and cost.
- opencode or Codex CLI: which terminal agent to chooseBoth agents are open source, both read AGENTS.md and both work with your own API. The differences are in providers, modes and cache billing. We compare and price a session.
- Function calling or MCP: what is the difference and what to chooseThese are not two rival methods but two levels of the same task. Who describes a tool, who runs it, and when you need MCP.