# opencode vs Claude Code: an honest comparison

URL: https://agentvera.dev/en/blog/opencode-vs-claude-code/ · Published: 2026-10-28

opencode vs Claude Code compared: models and providers, pricing, license, agents and plan mode, MCP and LSP, AGENTS.md vs CLAUDE.md, permissions and platforms.

**In short:**

- opencode is an MIT-licensed agent that works with 75+ providers and local models; Claude Code is Anthropic’s proprietary agent and runs Claude models only.
- Claude Code is paid through a Claude plan or API usage; opencode is free and you pay your provider, OpenCode Zen credits or an OpenCode Go plan ($10 or $40 a month).
- Claude Code asks before risky actions by default, while opencode allows most actions by default; opencode reads AGENTS.md and falls back to CLAUDE.md.

opencode vs Claude Code comes down to one question: do you want one vendor or any vendor? Claude Code is Anthropic’s coding agent. It runs Claude models only and comes with a Claude subscription. opencode is an open-source (MIT) agent that works with 75+ providers and local models, Claude included, but it can’t use your Claude Pro or Max plan. Both read your repo, edit files, run commands, support MCP and have a planning mode, so for daily work the choice is mostly about models, pricing and defaults.

This post compares them on the points that matter, as of October 2026, without invented benchmarks. Then it says which one to pick, and how to run both without them stepping on each other.

## What they are

**Claude Code** is Anthropic’s agent. Run `claude` in a project folder and talk to it. It also runs in VS Code (and Cursor), JetBrains, a desktop app, the web and the Claude mobile app, and every surface uses the same `CLAUDE.md`, settings and MCP servers. If you’re new to it, start with [how to use Claude Code](/en/blog/how-to-use-claude-code/ "How to use Claude Code").

**opencode** is a terminal agent that isn’t tied to one AI company. Its source is on GitHub (`anomalyco/opencode`) under the MIT license. Run `opencode` in a project folder, connect a provider with `/connect`, and pick a model with `/models`. Besides the TUI there is a desktop app (beta) and an IDE extension. The step-by-step guide is [how to use opencode](/en/blog/how-to-use-opencode/ "How to use opencode").

A note on opencode versions: opencode 2 has been released with its own docs, and both versions install a command called `opencode`. This comparison follows version 1, which is what the npm package `opencode-ai` installs.

## opencode vs Claude Code at a glance

| | opencode | Claude Code |
| --- | --- | --- |
| Maker | The opencode team (`anomalyco/opencode`) | Anthropic |
| License | MIT, open source | Proprietary, under Anthropic’s Commercial Terms |
| Command | `opencode` | `claude` |
| Models | 75+ providers (Anthropic, OpenAI, Google, GitHub Copilot, OpenRouter…) and local models | Claude models only |
| How you pay | Your provider’s API key or subscription, OpenCode Zen credits or OpenCode Go | Claude Pro, Max, Team or Enterprise, Console API credits, or a cloud provider |
| Claude subscription | Not supported | Yes |
| Planning | Plan agent (Tab switches Build ↔ Plan) | Plan mode (`Shift+Tab`) |
| Subagents | `@general`, `@explore`, custom agents in `.opencode/agents/` | Built-in and custom subagents in `.claude/agents/` |
| MCP | Yes, `mcp` key in `opencode.json` or `opencode mcp add` | Yes, `claude mcp add` or `/mcp` |
| LSP | Built-in servers, turned on with `"lsp": true` | Through code-intelligence plugins |
| Default permissions | Most actions allowed; asks for outside paths, loops and `.env` | Asks before edits and commands (unless you choose a looser mode) |
| Project instructions | `AGENTS.md` (falls back to `CLAUDE.md`) | `CLAUDE.md` (reads `AGENTS.md` when there is no `CLAUDE.md`) |
| Settings file | `opencode.json` | `settings.json` |
| Non-interactive runs | `opencode run "..."` | `claude -p "..."` |
| Session sharing | `/share` makes a link | Hand sessions between surfaces (`/desktop`, Remote Control, `--teleport`) |
| Other surfaces | Desktop app (beta), IDE extension, `opencode web`, `opencode serve`, ACP | Desktop app, VS Code, JetBrains, web, mobile, Slack, GitHub Actions |

## Models and providers

This is the biggest difference.

**Claude Code** runs Claude models. `/model` switches between them. You can reach those models through Anthropic directly or through Amazon Bedrock, Google Cloud or Microsoft Foundry, but it’s Claude either way.

**opencode** is built on the AI SDK and Models.dev, and its docs list support for 75+ providers. You can use Claude through an Anthropic API key, GPT models through ChatGPT Plus/Pro or an API key, models from GitHub Copilot, OpenRouter and many others, and local models through any OpenAI-compatible server such as Ollama. Models are written as `provider/model`, and each agent can have its own model:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "agent": {
    "plan": { "model": "anthropic/claude-haiku-4-5" }
  }
}
```

If you want to plan with a cheap model and build with a strong one, or try an open-weight model on your own GPU, opencode does that out of the box. If you’re happy with Claude, Claude Code is tuned for exactly those models.

## Pricing: subscription vs your own key

**Claude Code** is part of the Claude plans. As of October 2026 that means Pro ($20 a month, or $17 a month billed annually), Max 5x ($100) and Max 20x ($200), plus Team and Enterprise seats. The Free plan doesn’t include it. You can also skip the plan and pay per token with a Console account. Plans come with a rolling 5-hour window and a weekly limit.

**opencode** itself costs nothing. You pay for the models, in one of these ways:

- **Your own API key** from any provider, billed per token by that provider.
- **A subscription opencode can sign in with:** GitHub Copilot (some models need a higher Copilot plan) or ChatGPT Plus/Pro.
- **OpenCode Zen:** a curated set of models the opencode team has tested with the agent. It’s pay-as-you-go: you buy credits and pay per request, and a processing fee is added to each credit purchase. A few models are free for a limited time.
- **OpenCode Go:** an optional subscription for popular open coding models, at $10 a month (Go) or $40 a month (Go Plus) as of October 2026. Its limits are monthly dollar amounts per model, with 5-hour and weekly caps.
- **Local models:** no bill beyond your own hardware.

One thing to know before you switch: you **can’t** use a Claude Pro or Max subscription in opencode. Its docs say Anthropic prohibits it, and opencode stopped bundling the plugins that did it in version 1.3.0. Claude models in opencode mean an API key and per-token billing.

So if you already pay for Claude, Claude Code is the cheaper way to use Claude models. If you already pay for Copilot or ChatGPT, or you want to mix cheap and expensive models, opencode lets you use what you have.

## License and openness

opencode is MIT-licensed. You can read the code, fork it, and run it anywhere without asking anyone. Claude Code’s GitHub repository holds issues, plugins and examples, but its license file reads “© Anthropic PBC. All rights reserved” and points to Anthropic’s Commercial Terms. It’s free to install and you use it under Anthropic’s terms.

For most individual developers this matters less than models and price. For teams that need to audit the agent, patch it, or build on it, it can decide the question.

## Agents, subagents and plan mode

Both tools separate “think” from “do”.

**opencode** has two primary agents, and Tab switches between them. **Build** has every tool. **Plan** can’t edit your code; it may only write Markdown plans in `.opencode/plans/`. Two subagents come built in: `@general` for multi-step work and `@explore` for fast read-only searches. You add your own as Markdown files in `.opencode/agents/` (or `~/.config/opencode/agents/`), or with `opencode agent create`.

**Claude Code** puts planning in its permission modes: press `Shift+Tab` to reach plan mode, where Claude researches and writes a plan but doesn’t touch source until you approve it. It has built-in and custom subagents (Markdown files in `.claude/agents/`), and on top of that hooks, skills, plugins and checkpoints you roll back with `/rewind`. If you like to shape how the agent behaves, Claude Code has more building blocks.

One opencode pitfall: Plan doesn’t limit shell commands by itself, and a top-level `"edit": "allow"` reaches Plan too. If you want Plan locked down, set `agent.plan.permission` directly.

## MCP, LSP and sharing

**MCP.** Both support local and remote MCP servers. opencode keeps them under the `mcp` key in `opencode.json` (or adds them with `opencode mcp add`); Claude Code uses `claude mcp add` and `/mcp`. The formats differ, so if you use both tools you configure each server twice. New to MCP? Start with [what an MCP server is](/en/blog/what-is-mcp-server/ "What is an MCP server").

**LSP.** opencode ships language servers for TypeScript, Python, Go, Rust, Java, PHP and more. They’re off until you set `"lsp": true`, and then the right server starts when the agent opens a matching file. Claude Code gets code intelligence through plugins: a plugin can bring an LSP server, and Anthropic publishes language-server plugins.

**Sharing.** opencode has `/share`, which turns the current conversation into a link and copies it. Manual is the default, `"share": "auto"` shares every new session, and `"share": "disabled"` turns it off for a project. `/unshare` removes the link and the shared data. Claude Code focuses on moving a session between surfaces instead: `/desktop` continues a terminal session in the desktop app, Remote Control lets you keep going from your phone or a browser, and `claude --teleport` pulls a web session into your terminal.

## Config files: AGENTS.md vs CLAUDE.md

**opencode** reads `AGENTS.md` in the project and `~/.config/opencode/AGENTS.md` for personal rules. It falls back to `CLAUDE.md` when there is no `AGENTS.md`, and to `~/.claude/CLAUDE.md` when there is no global `AGENTS.md`. It also reads skills from `~/.claude/skills/`. Settings go in `opencode.json`, globally in `~/.config/opencode/` and per project, and the two are merged. `OPENCODE_DISABLE_CLAUDE_CODE=1` turns off all the `.claude` fallbacks.

**Claude Code** reads `CLAUDE.md` (project, personal `~/.claude/CLAUDE.md` and git-ignored `CLAUDE.local.md`), and reads `AGENTS.md` when a project has no `CLAUDE.md`. Settings live in `.claude/settings.json` and `~/.claude/settings.json`.

Both have `/init` to write a first version. If you use both, keep the real rules in one `AGENTS.md` and make `CLAUDE.md` a short file that imports it with `@AGENTS.md`. [How to write CLAUDE.md and AGENTS.md](/en/blog/claude-md-agents-md/ "How to write CLAUDE.md and AGENTS.md") covers what to put in it.

## Permissions

The defaults are opposite.

**Claude Code** asks first. In Manual mode only reads run without asking; accept-edits mode lets file edits through; auto mode lets a classifier review each action instead of you. You add allow, ask and deny rules with `/permissions`, and `/sandbox` turns on a Bash sandbox on macOS, Linux and WSL2.

**opencode** trusts first. Each permission is `allow`, `ask` or `deny`, and most default to `allow`. Only three things ask out of the box: paths outside the project (`external_directory`), the same tool call repeating three times (`doom_loop`) and reading `.env` files. You narrow it with patterns, where the last matching rule wins:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": { "*": "ask", "git *": "allow", "rm *": "deny" }
  }
}
```

Neither default makes an agent safe to leave alone on your main machine. For unattended work, give it a git worktree at minimum and a container if it can run arbitrary commands.

## Platforms

| | opencode | Claude Code |
| --- | --- | --- |
| macOS, Linux | Install script, npm, Homebrew tap | Native installer, Homebrew, apt/dnf/apk |
| Windows | Chocolatey, Scoop, npm; WSL recommended | Native installer (PowerShell, CMD), WinGet, WSL |
| Desktop app | Beta for macOS, Windows and Linux | macOS and Windows; Linux beta on Ubuntu/Debian |
| IDE | Extension for VS Code, Cursor, Windsurf, VSCodium | VS Code (and Cursor) extension, JetBrains plugin |
| Browser | `opencode web` serves a web UI | claude.ai/code |

## Which should you pick?

- **You already pay for Claude, or want plan mode, hooks, skills and plugins on Claude models:** pick Claude Code. It’s the only way to use your Claude plan, and it’s built around those models.
- **You want model choice, local models or an open MIT codebase:** pick opencode. It also suits people who already pay for Copilot or ChatGPT.
- **You care most about cost:** opencode with a cheap model, OpenCode Go or a local model can cost far less. Claude Code on Pro is predictable if Claude is what you want.
- **You want safe defaults without tuning:** Claude Code asks first. opencode can be just as strict, but you have to write the rules.
- **You want a second opinion on important changes:** use both. Claude Code writes, opencode with a different model reviews, or the other way round.

The honest test is the same as always: give both the same real task in your own repo, such as a bug with a failing test, and compare the diffs. Keep your rules in `AGENTS.md` and switching later costs nothing. If you’re also weighing OpenAI’s agent, see [Claude Code vs Codex](/en/blog/claude-code-vs-codex/ "Claude Code vs Codex").

## Running opencode and Claude Code side by side in AgentVera

Many people end up keeping both: Claude Code on their Claude plan, opencode for other models. The friction is familiar: two terminals, two MCP configs, and two agents that might edit the same file.

AgentVera is a desktop app for macOS, Windows and Linux that opens opencode and Claude Code (and 16 other CLI agents) in real terminals, using your own installs and logins:

- **One grid.** Both agents sit in one grid, each in its own git worktree, so they don’t touch each other’s files.
- **Your providers.** Every provider you connected in opencode, local models included, shows up in AgentVera’s model list. Your Claude login works as it is.
- **MCP once.** A server you add in the [MCP manager](/en/features/mcp-manager/ "MCP manager") attaches to both, and your `opencode.json` stays untouched.
- **Review.** [Automatic code review](/en/features/code-review/ "Automatic code review") checks the code when a turn ends, and with flows (Pro and Team) one agent’s answer goes to the other automatically.

The grid, worktrees, code review and the MCP manager are on the free plan. [Download AgentVera](/en/download/ "Download AgentVera") and open an opencode agent next to a Claude Code agent to compare them on your own code.

## Frequently asked questions

**Is opencode better than Claude Code?** Neither wins everywhere. opencode gives you any model and an open MIT codebase. Claude Code gives you Claude models on a Claude subscription, plus hooks, skills, plugins and checkpoints. Give both the same real task in your repo and compare the diffs.

**Can I use my Claude Pro or Max subscription in opencode?** No. As of October 2026, opencode’s docs say Anthropic prohibits using Claude Pro/Max through third-party plugins, and opencode stopped bundling them in version 1.3.0. You can still use Claude models in opencode with an Anthropic API key, billed per token.

**Is opencode free?** The tool is free and MIT-licensed. You pay for the models: an API key from any provider, a subscription it supports such as GitHub Copilot or ChatGPT Plus/Pro, OpenCode Zen credits, or an OpenCode Go plan at $10 or $40 a month. Local models cost nothing beyond your hardware.

**Does opencode read CLAUDE.md?** Yes, as a fallback. opencode reads AGENTS.md first and uses CLAUDE.md only when there is no AGENTS.md; it also falls back to ~/.claude/CLAUDE.md and reads skills from ~/.claude/skills/. Claude Code in turn reads AGENTS.md when there is no CLAUDE.md.

**Which one is safer by default?** Claude Code asks before edits and commands unless you pick a looser mode. opencode allows most actions by default and asks only for paths outside the project, repeated identical tool calls and .env files. Tighten opencode with ask and deny rules, and run either one in a worktree or container when unattended.

**Can I run opencode and Claude Code on the same project?** Yes. Give each its own git worktree so they don’t edit the same files. AgentVera opens both CLIs side by side in one grid, each in its own worktree, with your own logins.

---

**About AgentVera.** AgentVera is a desktop app for macOS, Windows and Linux, built by Solviera Teknoloji. It runs 18 AI coding agents (Claude Code, Codex, Gemini CLI, Copilot, Cursor, Antigravity, opencode, Hermes, Qwen Code, Kimi Code, Kiro, Amp, Droid, Goose, Vibe, Crush, Aider, Cline) side by side, per project, in real terminals with the user's own CLI installs and logins. The free plan has unlimited agents. Download: https://agentvera.dev/en/download/ · Pricing: https://agentvera.dev/en/pricing/
