OpenCode vs Claude Code: which coding agent should I use?

Short answer

Pick Claude Code if you work with Claude models and want to use your Claude subscription: Anthropic's terms reserve subscription sign-in for its own apps. Pick OpenCode if you want an open source (MIT) agent that switches between many providers, including local models, ChatGPT Plus or Pro, and GitHub Copilot. Claude models in OpenCode run on API billing.

The two side by side

Both are agents that read your code, edit files and run commands. The real difference is who supplies the model and how you pay for it. From both projects’ own sites and docs, as of November 2026:

OpenCode Claude Code
Maker OpenCode project, on GitHub as anomalyco/opencode Anthropic
License MIT, open source Anthropic’s Commercial or Consumer Terms
Models Many providers through the Models.dev catalog; its homepage says 200+, including local models Claude models, through Anthropic or Amazon Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry
Sign in with a subscription ChatGPT Plus or Pro, GitHub Copilot Claude Pro, Max, Ultra, Team, Enterprise
Own paid options OpenCode Go, from $10 a month; OpenCode Console, pay as you go per million tokens Claude plans, or API per token
Interfaces Terminal (TUI), desktop app, web via opencode pair, extension for VS Code and forks Terminal, VS Code, JetBrains, desktop app, web, mobile, Slack, GitHub Actions
Built-in agents build and plan, switched with Tab; subagents general and explore Plan mode and other permission modes; subagents, agent teams
Instruction file AGENTS.md only (V2) CLAUDE.md, can read AGENTS.md instead

Where OpenCode is stronger

  1. Model choice. You connect providers with /connect and switch per session. That includes models running on your own hardware through Ollama, LM Studio or vLLM, which matters if code may not leave the building.
  2. Using subscriptions you already pay for. OpenCode’s provider docs offer “Sign in with ChatGPT” for Plus and Pro plans and a device login for GitHub Copilot, so those models show no per-token cost in OpenCode.
  3. Openness. The code is MIT licensed. You can read what the agent does, fork it, and configure custom agents as markdown files in .opencode/agents/, with allow, ask or deny rules per action.
  4. One instruction file for both. OpenCode V2 reads AGENTS.md and does not use CLAUDE.md as a fallback, but Claude Code can read an AGENTS.md in place of a CLAUDE.md, so one file can serve both agents.

Install with curl -fsSL https://opencode.ai/v2/install | bash, npm i -g @opencode/cli or Homebrew. Its docs say Windows package managers are not supported.

Where Claude Code is stronger

  1. Your Claude subscription works. A Pro, Max or Team seat covers Claude Code within its usage limits; see Claude Code pricing.
  2. More surfaces from one vendor. Besides the terminal there are a JetBrains plugin, a desktop app with visual diff review, cloud sessions at claude.ai/code that keep running with your laptop closed, and Remote Control from your phone. See desktop vs CLI vs web.
  3. Central control for IT. Managed settings through the admin console, MDM or a file let an organization enforce permissions and versions on every machine; see how to install Claude Code.

The misunderstanding: “OpenCode is Claude Code without the bill”

The agent costs nothing to install, but the model never was part of the tool. Running Claude models in OpenCode means an Anthropic API key, paid per token, or OpenCode Console, also pay as you go. Anthropic’s legal page for Claude Code is explicit: subscription sign-in is for Claude Code and its other native apps, and third-party developers may not offer Claude.ai login or route requests through Free, Pro, Max or Ultra credentials. OpenCode’s current provider docs list sign-in for ChatGPT and Copilot, not for Claude. So the honest comparison is Claude Code on a subscription versus OpenCode on an API key, or OpenCode with a different model.

Which to pick

  1. The team standardizes on Claude and pays for Claude seats: Claude Code.
  2. You want to switch between OpenAI, Claude, open models and local models, or already pay for ChatGPT or Copilot: OpenCode.
  3. Code may not leave your network: OpenCode with local models. Claude Code always calls a hosted Claude model, through Anthropic or your own cloud account.
  4. Mixed team: both, with shared instructions in AGENTS.md.

What this means for a team

Teams rarely pick one agent for everyone. The instruction file can be shared, but each tool keeps its own sessions, its own learned memory and its own history. A decision one developer settled with Claude Code is not known to a colleague’s OpenCode session. More in shared memory across coding agents and Codex vs Claude Code for teams.

Where Bombos fits

If a team runs OpenCode and Claude Code side by side, the gap is not the agent but what the agents know. Bombos is a plugin that gives every AI tool a team uses one shared memory: team knowledge, rules learned along the way, and what already sits in mail, documents and repos, traceable to the source, in the cloud or on your own server. One developer can try it on their own agents first.

Related questions

Can I use my Claude Pro or Max subscription in OpenCode?

No. Anthropic's Claude Code legal page says subscription sign-in is for Claude Code and other native Anthropic apps, and third-party developers may not route requests through Free, Pro, Max or Ultra credentials. Use an Anthropic API key or another provider in OpenCode.

Does OpenCode read my CLAUDE.md?

Not in OpenCode V2, the version the current docs and install command cover. It recognizes AGENTS.md only and does not use CLAUDE.md as a fallback. The older V1 did read CLAUDE.md when no AGENTS.md existed.

Is OpenCode open source?

Yes. It is MIT licensed, and the code is on GitHub under anomalyco/opencode.

Can OpenCode run local models?

Yes. Its provider docs describe built-in discovery for Ollama, LM Studio and vLLM.

Can I use both on the same repo?

Yes. Put shared instructions in AGENTS.md: OpenCode reads it, and Claude Code can read an AGENTS.md in place of a CLAUDE.md.

Sources

  1. OpenCode: homepage
  2. OpenCode docs: Providers
  3. OpenCode docs: Instructions
  4. OpenCode on GitHub
  5. Claude Code docs: Legal and compliance
  6. Claude Code docs: Overview
The first half hour · free

What does your AI forget?

  1. 01You tell us which AI you use and where it keeps starting over.
  2. 02We show what a shared memory changes there, on your own examples.
  3. 03You keep the plan, with or without Bombos.
Piet Baudoin
Piet BaudoinYou talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe
We reply the same working day.