The short answer
OpenCode is an open-source coding agent. You give it a task in plain language, and OpenCode reads your project’s code, edits files, runs commands and shows you what changed. You use it in the terminal, in a desktop app or in the browser.
The big difference from Claude Code and Codex: OpenCode belongs to no model maker. It works with models from more than 200 providers, from Anthropic and OpenAI to open models you run on your own machine. You decide which model reads your code.
OpenCode is built by the company Anomaly and released under the MIT license. The project has more than 200,000 stars on GitHub, which makes it one of the most used open-source agents.
What OpenCode does
A task like “add a search field to the customer list” gets broken into steps. OpenCode finds the files involved, writes the change and runs the tests. You watch and steer where needed.
In the terminal
The best-known form is the terminal app. It runs in any shell, inside your editor and on a remote server, in your project's folder.
Desktop app and browser
If you prefer not to work in the terminal, there is a desktop app for macOS, Windows and Linux, and a browser version. The same agent sits behind all three.
Plan and build
OpenCode has two main agents. Build is the default and changes code. Plan explores your project and writes a plan without touching any files. The Tab key switches between them.
Subagents for side tasks
For searching and multi-step jobs, OpenCode calls a subagent such as General or Explore, which keeps the main conversation clean. You can also define your own agents, each with its own instructions and permissions.
Conventions in AGENTS.md
The /init command reads your project and creates an AGENTS.md file with its conventions: how you test, which style you follow, what is off limits. OpenCode also reads an existing CLAUDE.md.
For each action you decide what OpenCode may do: go ahead, ask first or never. You can also connect MCP servers for extra tools. That combination of model, tools and limits is called an AI harness, explained in what is an AI harness.
Which models work with OpenCode?
Almost any. OpenCode takes its list of providers from Models.dev, an open directory of models and prices. You connect a provider with an API key and then pick the model per task.
A few subscriptions work directly. You can log in with ChatGPT Plus or Pro, or with GitHub Copilot, and OpenCode then runs within that subscription. A Claude subscription is not on that list: you use Claude models in OpenCode with an Anthropic API key.
OpenCode finds local models on its own. If Ollama, LM Studio or vLLM runs on your machine, its models show up in the list straight away, and your code never leaves your computer. Expect less from a small local model than from a large cloud model, though. How to set that up is covered in the best AI harness for coding.
What does OpenCode cost?
OpenCode itself is free. You pay only for the model you use, and a few free models are included that need no account. Those free models are available for a limited time, and some use your data for training, so keep client code away from them.
If you would rather not set up a provider yourself, you can go through OpenCode. The OpenCode Console is an optional set of models the team has tested, paid per use. OpenCode Go is a subscription at 10 dollars a month, with Go Plus at 40 dollars, for a selection of mostly open models. With your own API key or your ChatGPT or Copilot subscription you need neither. Current prices are on the OpenCode website.
OpenCode, Claude Code and Codex side by side
All three are coding agents you hand a task to. The difference lies mostly in who supplies the models and what you already pay for.
| OpenCode | Claude Code | Codex | |
|---|---|---|---|
| Made by | Anomaly, as an open-source project. | Anthropic, the company behind Claude. | OpenAI, the company behind ChatGPT. |
| Models | From more than 200 providers, local ones included. | Anthropic's Claude models. | OpenAI's models, plus an open model locally. |
| Where you work | Terminal, desktop app or browser. | Terminal, VS Code, JetBrains, desktop app or browser. | Terminal, editor, ChatGPT in the browser or the desktop app. |
| Conventions in | AGENTS.md, and it also reads CLAUDE.md | CLAUDE.md | AGENTS.md |
| Open source | Yes, the whole agent. | No. | The CLI is, the cloud version is not. |
| Cost | Free, you pay for the model. Works with ChatGPT or Copilot. | Included in paid Claude plans, or pay per use through the API. | Limited on the free plan, full from ChatGPT Plus, or pay per use through the API. |
Choose OpenCode if you do not want to be tied to one provider, want to work locally, or want to compare models on your own code. If you already work with Claude or ChatGPT and are happy with it, Claude Code and Codex are the shortest route, because each is tuned to its own models. Torn between the two? OpenCode vs Claude Code puts the differences side by side.
How a senior team works with OpenCode
Free choice of model is useful, and also a trap: a different model every week means different mistakes every week. This is what works.
One model per kind of task
Pick a strong model for the real build work and a faster, cheaper one for searching and small jobs. Put that choice in the config so the whole team runs the same setup.
Plan first, then build
Have OpenCode draw up an approach in Plan and read it before you switch to Build. A mistake in the plan is cheaper than a mistake across twenty files.
A good AGENTS.md
List the test commands, the folder structure and what is off limits. Every mistake the agent makes twice becomes a rule. Because the file lives in your repo, it comes along when you switch model or tool.
Permissions per action
Let reading and searching run freely, and have OpenCode ask before it deletes anything, pushes or runs an unfamiliar command.
Review every change
What the agent produces gets reviewed like a colleague's work. For security, payments and customer data, a senior developer looks extra closely.
An open agent gives you the choice of model. Responsibility for the code stays with you.
Where OpenCode is a poor fit
Like every coding agent, OpenCode is made for people who can read code. Without that, you cannot judge whether a change is safe. If you want to build something without programming knowledge, a tool like Lovable is a better place to start.
If you would rather type every line yourself with AI as a helper, an editor like Cursor fits better. And if you want everything in one subscription from one provider, with support and administration for a large team, the agents from Anthropic or OpenAI are sometimes the better choice.
Conclusion: the open coding agent
OpenCode is the coding agent for people who want to choose the model themselves. It works in the terminal, the desktop app and the browser, with models from hundreds of providers and with local models. What produces good work is the same as with any agent: a clearly set up project, small tasks and a review by someone who knows where things go wrong.
OpenCode = free choice
An open-source agent with any model, in the cloud or on your own machine.
Senior developer = judgement
The model, the limits and the review. That is where quality lives, and you do not leave it to the agent.
What is OpenCode?
Is OpenCode free?
What is the difference between OpenCode and Claude Code?
Does OpenCode work with local models?
Can I use OpenCode with my ChatGPT or Copilot subscription?
Is OpenCode safe for client code?
Build faster with AI without lowering the bar?
Our senior developers work with coding agents every day. Bring them onto your project, or have your team learn to use them well in a workshop.