OpenCode
An open coding agent for the terminal: the agent itself is free, and you connect any model.
Sign in $0
The agent itself is free, you pay for the model
Any model
75+ providers, your own key
Open source
MIT license, the entire agent
Choose it if you want freedom: any model with your own key, open source, works fully locally too. Do not choose it if you need the most out of the box β Claude Code has the best benchmark pairing, and you cannot connect a Claude subscription here.
OpenCode is a coding agent that lives in the terminal and is not tied to a single vendor. You install it with one command, write the task in plain words - and the agent reads the project itself, edits files and runs tests until it gets to a result. What sets it apart from Claude Code and Codex is how it is built: the code is open, and you pick the model under the hood yourself, from GPT to a free local one. In a year and a half the repo has grown from four thousand to two hundred ten thousand stars on GitHub.
Where OpenCode sits on the big AI map
Nearby: Claude CodeΒ·CodexΒ·CursorΒ·ClineΒ·aiderΒ·+ another 60
1. Should you get it
The choice is simple: OpenCode is bought for freedom, not quality. Consider what matters more to you.
Who it is for. For anyone who wants to decide themselves which model writes their code and what it costs. Your own key from any of 75+ providers, a ChatGPT or Copilot subscription, a free local model - one agent, any engine. The agent's code is open: you can see what it does, and the price of the tool itself is zero, with no one in a position to raise it.
Who it is not for. For anyone who needs maximum quality with no setup. The best measured pair belongs to Claude Code with Opus 5.5 β 66 points, while OpenCode scores 53.6 in the same index with GLM-5.3. And you cannot plug a Claude Pro/Max subscription into OpenCode: Anthropic forbids it, and the plugins were removed as of version 1.3.0.
No coding at all? Then a terminal agent is not the first door: it expects you to read what it writes. Start with the vibecoding page (the door below) and come back here for the tool.
OpenCode does not build this site. We vibecode vibecoding.tech in Claude Code and Codex: as of September 8, 2026, the former made nine tenths of merged changes, the latter the rest. Which machine is working right now is shown by live.
Sounds right - install it per section 3. If you are choosing between it and Claude Code, the fork is in section 7.
2. What it can do
The work looks like this: you write the task in words, walk away, and the agent comes back with a finished result.
It works in a loop. There are two modes inside: Plan reads the project and proposes a strategy, Build carries it out. It edits files, runs commands, runs tests and fixes what it broke itself. Every action goes through permissions, and you decide what the agent asks about, what it does on its own and what it is forbidden to touch.
Any engine. Connect a model through your own API key (75+ providers), a ChatGPT Plus/Pro or GitHub Copilot subscription, the Zen gateway β or entirely locally through Ollama or LM Studio, so code never leaves your machine. There is no Claude subscription here: Anthropic prohibits it in third-party agents.
It sees code like an IDE. Under the hood are language servers (LSP): the agent does not just read file text, it follows definitions and references like a programmer in an editor. This is its signature difference β the community calls it the reason OpenCode works more accurately with equal models.
It extends like building blocks. MCP servers connect databases, a browser and external APIs, while plugins and subagents are assembled in the config. In version 2.0 the agent lives as a background server with a password: the `opencode pair` command opens the same session in a browser through a one-time link.
3. Where it works and how to install
The terminal is its main home; the other surfaces grew around it.
Terminal. The main surface: a text interface in any modern terminal emulator. There is a desktop app (macOS, Windows, Linux), an editor extension, and server mode β manage sessions from a browser or phone.
How to install
Step 1. Install the agent with the command below. Since September 2026 it installs version 2.0 and replaces the old 1.x. There are npm and brew packages too.
curl -fsSL https://opencode.ai/v2/install | bashStep 2. Run `opencode` in the project folder and connect a model with the `/connect` command: a provider key, a ChatGPT or Copilot subscription, Zen or a local Ollama.
opencodeStep 3. Give it the first task in words and watch the plan: Plan mode shows the strategy before Build starts changing files.
Commands verified Sep 26, 2026 against opencode.ai/download and opencode.ai/v2/docs
4. What the tests show
An agent cannot be measured without a model: a score always comes as an "agent + model" pair.
In the table. The Artificial Analysis index as of Sep 25, 2026 measures OpenCode with the open model GLM-5.3: 53.6 points and 11th place out of 20 pairs. The best pair, Claude Code with Opus 5.5, scores 66.
Cost per task. On the other hand, in the same table a task on OpenCode costs $4.24, while on the leader it costs $13.04 β three times more. OpenCode's ceiling equals the ceiling of the model you put into it.
Community measurement. A second signal comes from the market: 210,000 GitHub stars as of Sep 26, 2026, 10,000 more than on August 21, and over 2 million npm installs a week. Stars do not measure code quality, but they measure developer trust well.
Agent table: weight - editorial Β· AA score - best pairing Β· Artificial Analysis Β· βββ - pairing not measured
5. How much it costs
The agent itself is entirely free. The money goes not to OpenCode, but to the model β and there are four paths.
Your own key (BYOK). Connect a provider key and pay them directly at their rates. Straightforward, but with no cap: a Hacker News user accidentally spent $6 on one small feature through an Anthropic key (Feb. 2026). Watch your spending yourself.
The Zen gateway. A curated list of models with pay-as-you-go billing: top up the balance from $20 and pay for tokens with no markup. Claude Opus 5.5 costs $4/$20 per million input and output tokens, Sonnet 5 costs $2/$10. Nine models are free, and the vendor marks them "for a limited time".
The Go subscription. $10 a month for 32 inexpensive models with limits on five-hour windows. The subscription also includes GLM-5.3, the model OpenCode was measured with in the index. Practitioners build a working setup on this for ten bucks: "a task costs $0.4β1".
A local model. Ollama or LM Studio on your own machine: free, private, slower than top cloud models.
Payment options and what they offer
Prices verified Sep 26, 2026 Β· opencode.ai/zen Β· opencode.ai/go Β· the list of free Zen models changes
What we checked and how
| Fact | What we know | Verified |
|---|---|---|
| The agent itself β $0, MIT license | GitHub API: MIT license; no subscription for the agent (opencode.ai) | Sep 26, 2026 |
| Zen: balance from $20, auto-reload at $5, no token markup | opencode.ai/docs/zen; anchor prices: Opus 5.5 $4/$20, Sonnet 5 $2/$10 per 1M tokens | Sep 26, 2026 |
| Go: $10/mo, the first-month discount is gone | opencode.ai/go; the discount was removed Aug 24, 2026 (changelog 1.18.22); 32 models, limits on five-hour windows | Sep 26, 2026 |
| Zen has 9 free models, all "for a limited time" | opencode.ai/docs/zen as of Sep 26, 2026; the lineup changes | Sep 26, 2026 |
6. Can you trust it with code
We look at three things: where the code goes, what researchers have found, and what the agent can do to your machine.
Where the code goes. The agent runs locally and goes straight to the model provider you pick - there are no intermediary servers by default, and with a local model the code never leaves your machine at all. One caveat: the /share command (off by default) publishes the conversation on opencode.ai, and when you work through Zen the traffic goes through the vendor's gateway.
The vulnerability was serious. In January 2026 CVE-2026-22812 was published (8.8 out of 10): the agent raised a local server with no authentication, and a malicious site could run commands on the machine straight from the browser. It was closed in version 1.0.216, older versions are vulnerable - update right away. In version 2.0 the agent server is password-protected by default.
Permissions are not a cage. The permissions system shows what the agent is doing, but researchers have demonstrated ways to bypass command text filters. Run unfamiliar code and autonomous marathons in Docker or a VM β that is user discipline, not a setting.
Telemetry. Users report telemetry being sent to the vendor's servers even with local models; the project has no separate public telemetry policy page. The code is open β you can check exactly what is sent yourself.
What we checked and how
| Fact | What we know | Verified |
|---|---|---|
| CVE-2026-22812: RCE through a local server, CVSS 8.8 | GHSA-vxw4-wv6m-9hhh and NVD, published Jan 12, 2026; fix - version 1.0.216; in 2.0 the server web interface is password-protected by default (opencode.ai/v2/docs/cli/web) | Sep 26, 2026 |
| Code and context are not stored on the agent's servers | Runs locally, requests go directly to the model provider (opencode.ai); /share is opt-in | Sep 26, 2026 |
| Permissions are awareness, not a sandbox | Community demonstrations of text-filter bypasses (HN, DeepWiki); mitigation: Docker/VM | Aug 21, 2026 |
| Telemetry: practitioner reports, no official policy | HN/Habr reports of telemetry with local models; no policy page found | Aug 21, 2026 |
7. OpenCode or Claude Code
The most common fork. Short answer: OpenCode gives you freedom, Claude Code gives you quality out of the box.
A different trade-off. Claude Code gives the best measured pair, 66 points against 53.6 for OpenCode with GLM-5.3. In Builder.io's run on the same model it closed four tasks in 9 minutes against 16 for OpenCode, but OpenCode wrote more tests. One is built for speed, the other for thoroughness.
Subscription math. Claude Code runs on the Claude Pro/Max subscription - and Anthropic forbids using it in third-party agents, so in OpenCode the Claude models are available only through an API key with per-token billing. OpenCode's cheap setup is built differently: Go at $10 with inexpensive models, or Zen's free models.
Both at once. Heavy users keep OpenCode for everyday work with cheap models and Claude Code for tasks that demand the maximum. There are other open neighbors too: Cline in the editor, aider in the terminal.
What to choose for the task
AA Coding Agent Index β data as of Sep 25, 2026 Β· Builder.io run β Firecrawl, Jun 1, 2026
8. History
The project is a year and a half old, and for most of that time it has lived with a scandal in its biography: the OpenCode name came to it as a trophy from a public split between two teams.
04
Developer Kuytim Khodzha builds the terminal agent TermAI; the SST team joins, and the project gets the name opencode and the opencode.ai domain.
Apr 30
The current repository is created: a TypeScript rewrite of the agent under SST's wing (later β Anomaly).
Jul 31
Split with Charm: the company takes the Go branch and its author under the name Crush, while SST retains the opencode name.
Jan 12
Critical vulnerability CVE-2026-22812 published: the agent's local server lacks authentication; fixed in version 1.0.216.
Mar 21
First place on the Hacker News front page: 126 thousand GitHub stars and, according to the vendor, 5 million monthly users.
Sep 12
OpenCode 2.0 is out: a new API for plugins and the server, while the opencode command and the old settings stayed the same. opencode.ai now ships it on the home page.
9. Frequently asked questions
What is OpenCode in plain English?+
A coding agent for the terminal: describe a task in words, and it edits files, runs commands, and checks the result itself. Open-source and free (MIT), it works with any model β your own key, a ChatGPT or Copilot subscription, or a local model. Built by Anomaly, formerly known as SST.
Is OpenCode free?+
Yes, the agent itself is completely free: no subscription, no per-seat fee. You pay only for the model: your own provider key, the Zen gateway on a pay-as-you-go basis, or the Go subscription at $10 a month. You can also run with no bill at all: a local model through Ollama or Zen's free models (as of Sep 26, 2026 there are nine of them, and the vendor marks them "for a limited time").
Can I connect a Claude Pro or Max subscription?+
No. Anthropic explicitly prohibits using Claude subscriptions in third-party agents, and OpenCode removed such plugins starting with version 1.3.0. Claude models remain available with an Anthropic API key or through the Zen gateway β charged by tokens. ChatGPT Plus/Pro and GitHub Copilot subscriptions connect normally.
What are OpenCode Zen and OpenCode Go?+
Two ways to avoid fiddling with keys. Zen works as a gateway with a curated list of models: top up the balance from $20 and pay for tokens with no markup. Go is a $10-a-month subscription covering 32 inexpensive models, among them GLM-5.3, Kimi K3 and DeepSeek. Both are optional - your own key from any provider works without them.
What changed in OpenCode 2.0?+
Version 2.0 shipped September 12, 2026, and it is now what the command on the opencode.ai homepage installs. In the terminal it is still the same opencode command, and old settings, agents and skills are picked up without edits. The only things you will have to rewrite are plugins and integrations with the agent server: they have a new API.
OpenCode or Claude Code β which should you choose?+
People take OpenCode for the freedom - open code, any model, a local mode and $0 for the agent itself. People take Claude Code for quality out of the box. In the Artificial Analysis index as of Sep 25, 2026 the Claude Code pair with Opus 5.5 scores 66 points against 53.6 for OpenCode with GLM-5.3, but a task on OpenCode costs three times less. Heavy users often keep both: OpenCode for everyday work with cheap models, Claude Code for the hard stuff.
Are OpenCode and Crush the same thing?+
No, they are two branches of one early project. In summer 2025, the team split: the author of the original code joined Charm, and their branch became known as Crush, while the OpenCode name and opencode.ai domain stayed with the SST team, now Anomaly. This card is about opencode.ai.
What we wrote about OpenCode
Useful reading before you start
- What is vibecoding: starting from scratch.
- Claude Code: the main competitor from section 7.
- MCP: how an agent connects to your services.
- The full AI agent ranking.



