Key takeaways

  • Claude Code is Anthropic's proprietary agent and runs only Claude models, included in paid Claude plans from $20 a month.
  • OpenCode is a free, MIT-licensed agent from Anomaly that works with models from many providers, local models included, and sells optional model access from $10 a month.
  • A Claude Pro or Max plan cannot be used inside OpenCode, so Claude models there need an API key, a cloud provider or OpenCode's own paid service.

In Claude Code vs OpenCode, the main split is models and license. Both are coding agents that read your project, edit files and run commands. Claude Code is Anthropic's proprietary agent and runs only Claude models, usually on a Claude subscription. OpenCode is an MIT-licensed open source agent from Anomaly that works with models from many providers, including Claude, GPT, Gemini and local models, and the app itself is free.

This comparison is based on each product's official docs, pricing pages and GitHub repositories as of November 15, 2026, and on published results; it involved no hands-on testing.

Claude Code vs OpenCode at a glance

Claude Code OpenCode
Made by Anthropic Anomaly
License Proprietary: "All rights reserved", use under Anthropic's terms MIT, open source
GitHub stars (November 15, 2026) About 155,700 (issues and changelog repo) About 226,900
Models Claude only (Opus, Sonnet, Haiku, Fable) Catalog from Models.dev, "200+" providers by OpenCode's count, plus local models
Default model Opus 5.5 on Pro, Max, Ultra, Team, Enterprise and the API The one you configure, or the newest available supported model
Price of the agent Included in paid Claude plans, or pay per token through the API Free
Cheapest paid option Claude Pro, $20 a month ($17 billed annually) OpenCode Go, $10 a month
Use an existing subscription Claude plans ChatGPT Plus or Pro, GitHub Copilot
Local models No Ollama, LM Studio and vLLM detected automatically
Apps Terminal, VS Code and Cursor, JetBrains, desktop, web, Claude mobile app, Slack Terminal, desktop, web, iOS (TestFlight) and Android

What each one is

Claude Code is Anthropic's agentic coding tool. Its docs describe a terminal CLI, extensions for VS Code, Cursor and JetBrains IDEs, a desktop app, a browser version at claude.ai/code, and hooks into GitHub Actions, GitLab CI/CD and Slack. Every surface uses the same engine, so a project's CLAUDE.md instructions, settings and MCP servers carry across.

OpenCode is "an open source coding agent," according to its site. It ships as a terminal UI, a desktop app for macOS, Windows and Linux, a mobile app, and a TypeScript SDK. Anomaly says more than 22 million developers use it every month. Version 2.3.0 shipped on November 13; our earlier article on OpenCode 2 covers the move to version 2.

Is either one open source

OpenCode is. The GitHub repository carries the MIT license, which lets anyone read, fork, change and ship the code.

Claude Code is not. Its GitHub repository is public, but it holds the issue tracker and changelog rather than the source code, and its license file reads in full: "© Anthropic PBC. All rights reserved." Use falls under Anthropic's Commercial Terms or Consumer Terms, depending on the plan. More detail is in Is Claude Code open source?

Which models each one supports

Claude Code runs Claude models only. Its model settings offer the aliases opus, sonnet, haiku and fable, plus versions of Opus and Sonnet with a 1 million token context window. On the Anthropic API, opus means Claude Opus 5.5, sonnet means Sonnet 5.5 and haiku means Haiku 5.5. Beyond Anthropic's own service, it can run through Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform (formerly Vertex AI) and Microsoft Foundry, or through a company LLM gateway.

OpenCode lists models from Models.dev, a shared catalog, plus whatever you configure. You connect providers with /connect in the terminal. The providers docs cover:

  • API keys for the big labs, cloud platforms such as Azure and Google Cloud, and OpenRouter.
  • Signing in with a ChatGPT Plus or Pro plan instead of an OpenAI API key, so usage counts against that plan.
  • GitHub Copilot through device sign-in.
  • Local models: OpenCode looks for Ollama, LM Studio and vLLM on their default ports and adds the models it finds.

Claude models do work in OpenCode, but you reach them through an API key, a cloud provider or OpenCode's own paid service. A Claude Pro or Max plan does not carry over: Anthropic's legal and compliance page says it "does not permit third-party developers to offer Claude.ai login into their own applications," and OpenCode's providers docs do not offer a Claude account login.

What each one costs

Claude Code has no separate price. It comes with paid Claude plans, as of November 15, 2026:

Claude plan Price Claude Code
Free $0 Not included
Pro $20 a month, or $17 a month billed annually Included
Max $100 a month 5 times Pro usage
Ultra $200 a month 10 times Pro usage per week, no 5-hour limit for verified accounts
Team standard seat $25 a month, or $20 billed annually Included
Team premium seat $125 a month, or $100 billed annually 5 times a standard seat
Enterprise $20 a seat a month, billed annually, plus usage at API rates Included

You can also use Claude Code with an API key and pay per token. On the Claude API, Opus 5.5 costs $4 per million input tokens and $20 per million output tokens, and Sonnet 5.5 costs $2 and $10.

OpenCode itself costs nothing. You pay whoever serves the model. OpenCode sells model access too, through its optional Console:

  • Free models. A rotating set, free "for a limited time." Some providers keep your data or use it for training during the free period; the docs list which.
  • Pay as you go. Per-token prices with "markup only to cover processing fees": a fee of 4.6% plus $0.31 on each credit purchase. Claude Opus 5.5 costs $4 in and $20 out per million tokens there, the same as Anthropic's list price.
  • OpenCode Go. $10 a month, Go Plus at $40, or Go Teams at $20 per member. Go covers more than 30 models, mostly open-weight ones such as GLM, Kimi, Qwen, DeepSeek and MiniMax, plus Claude Haiku 5.5 and some GPT and Gemini models. It does not include Claude Opus or Sonnet.

Go's limits are dollar amounts per model per month. On the $10 plan, for example, Claude Haiku 5.5 gets $15 of usage and DeepSeek V4.1 Flash gets $100. Each model also has a 5-hour cap of 20% of its monthly limit and a weekly cap of 50%.

How to install each one

Claude Code's recommended install on macOS, Linux and WSL:

curl -fsSL https://claude.ai/install.sh | bash

On Windows PowerShell it is irm https://claude.ai/install.ps1 | iex. Homebrew, WinGet, apt, dnf and apk also work; npm is deprecated. Then run claude in a project and sign in.

OpenCode's install:

curl -fsSL https://opencode.ai/v2/install | bash

npm, Bun, Homebrew, the Arch User Repository, mise, Nix and Docker work too. Windows package managers are not supported, but there are Windows binaries and a desktop installer. Then run opencode and connect a provider, or start with a free model without an account.

Features side by side

Both cover the basics of a modern coding agent: a plan mode that explores before editing, subagents, MCP servers for outside tools, custom commands, skills, a scriptable non-interactive mode for CI, and an SDK.

Feature Claude Code OpenCode
Plan before editing Plan mode Built-in Plan agent
Subagents Yes, plus background agents and an Agent SDK General and Explore built in, custom ones in Markdown; background by default since v2.3.0
Project instructions CLAUDE.md, or reads AGENTS.md Instruction files and agent files in .opencode/
Permissions out of the box Asks before edits and most shell commands in Manual mode; auto mode with safety checks is the starting mode in recent versions Build agent allows tools by default; rules set allow, ask or deny per command or path
Extensions MCP, skills, hooks MCP, skills, plugins for server, terminal and desktop
Run on a schedule or in the cloud Cloud and desktop scheduled tasks, web sessions No scheduling page in the docs
IDE extensions VS Code, Cursor, JetBrains None listed; the terminal UI runs in any editor's terminal
Team admin Team and Enterprise plans, managed settings Console workspaces with SSO, SCIM and budgets

Two differences stand out. Claude Code reaches further beyond the terminal: scheduled tasks that run in the cloud while your laptop is off, sessions you hand off between phone, browser and terminal, and Slack. OpenCode gives you more control: a different model per agent, rules that allow, ask or deny each command, and the source code when you want to change how it works.

Their defaults on safety differ too. Claude Code's Manual mode stops before file edits and most commands, and its auto mode runs background safety checks. OpenCode's Build agent allows tools by default and only asks before reading sensitive environment files, so it is worth adding permission rules before letting it loose on a real repository.

Benchmarks: no head-to-head result yet

No independent leaderboard checked for this article showed Claude Code and OpenCode running the same model on the same tasks. The Terminal-Bench leaderboard, which ranks agent and model pairs on terminal tasks, had no rows to read on November 15, and its run guide uses Claude Code only as an example agent.

Claude Code with Opus 5.5 and OpenCode with Opus 5.5 call the same model at the same API price. What differs is the harness: the prompts, tools and context handling around the model. Until a leaderboard runs both with one model, claims that either harness is better rest on anecdotes.

Which one to choose

Choose Claude Code if you already pay for Claude Pro, Max or a Team plan. Its usage comes with the plan, and the same plan cannot be used inside OpenCode. You also get the IDE extensions, cloud sessions and scheduled tasks.

Choose OpenCode if you want to pick the model per task, use a ChatGPT or Copilot subscription you already have, run local models, or need an open source license. OpenCode Go, at $10 a month, costs half of Claude Pro, but its models are mostly open-weight ones.

For more head-to-heads, see Claude Code vs Codex and Claude Code vs Gemini CLI.

Frequently asked questions

Is OpenCode free?

The OpenCode app is free and MIT-licensed. You pay for the models: through your own API keys, an existing ChatGPT or Copilot plan, OpenCode's pay-as-you-go service or OpenCode Go from $10 a month. A set of free models is offered for a limited time, and some of them keep your data during the free period.

Can I use Claude models in OpenCode?

Yes, with an Anthropic API key, a cloud provider such as Amazon Bedrock, or OpenCode's pay-as-you-go service, which charges Anthropic's list price of $4 and $20 per million tokens for Opus 5.5. Anthropic does not allow third-party apps to offer Claude account login, so a Claude Pro or Max plan does not work there.

Is OpenCode fully open source?

Yes. The OpenCode repository on GitHub is under the MIT license. Claude Code is not open source: its license file reads "All rights reserved."

Can OpenCode run local models?

Yes. OpenCode detects Ollama, LM Studio and vLLM running on their default local ports and adds their models to the model list. Claude Code does not run local models.

Sources

  1. Claude Code overviewAnthropic
  2. OpenCodeAnomaly
  3. anomalyco/opencodeGitHub
  4. anthropics/claude-codeGitHub
  5. Claude pricingAnthropic
  6. Claude API pricingAnthropic
  7. Claude Code model configurationAnthropic
  8. Claude Code enterprise deployment overviewAnthropic
  9. Claude Code legal and complianceAnthropic
  10. Claude Code permission modesAnthropic
  11. OpenCode docs: introAnomaly
  12. OpenCode docs: providersAnomaly
  13. OpenCode docs: modelsAnomaly
  14. OpenCode docs: agentsAnomaly
  15. OpenCode docs: permissionsAnomaly
  16. OpenCode Console models and pricingAnomaly
  17. OpenCode GoAnomaly
  18. OpenCode pressAnomaly
  19. OpenCode releasesGitHub
  20. Terminal-Bench leaderboardTerminal-Bench

Add ClaudeGPT Si as a preferred source on Google