# OpenCode vs Claude Code: token overhead, pricing, and features

We measured what OpenCode and Claude Code send to the same Claude model before you type, then compared plans, prices, adoption, and features. Reviewed 2026-10-08. Published by Replicas, which runs both tools.

- Canonical: https://replicas.dev/resources/opencode-vs-claude-code

## Same model, different harness

We pointed both agents at Claude Opus 5.5 and captured what each sends before you type a word. Plus plans, prices, adoption, and features, checked against both vendors’ docs.

| Agent | System prompt | Tool definitions | Injected context | Total tokens | Tools |
| --- | --- | --- | --- | --- | --- |
| OpenCode | 2917 | 7551 | 0 | 10468 | 10 |
| Claude Code | 1965 | 23907 | 3348 | 29220 | 23 |

- Claude Code sends 2.8× as many tokens before your first message: 29,220 against 10,468. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)[3](https://platform.claude.com/docs/en/build-with-claude/token-counting)
- Tool definitions are most of the gap. Claude Code sends 23 tools, OpenCode sends 10. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)
- In dollars it’s small once cached. On Opus 5.5 the overhead costs $0.146 against $0.052 on the first turn, then $0.0058 against $0.0021 per turn read from cache. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)[2](https://platform.claude.com/docs/en/about-claude/pricing)
- OpenCode also sends a separate 788-token request to a small Claude model to title each new session. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)

| Job | OpenCode | Claude Code |
| --- | --- | --- |
| Run shell commands | `bash` | `Bash` |
| Read, edit, write files | `read` `edit` `write` | `Read` `Edit` `Write` |
| Find files and search code | `glob` `grep` | Not in the request |
| Fetch a web page | `webfetch` | `WebFetch` |
| Search the web | Not in the request | `WebSearch` |
| Delegate to subagents | `task` | `Agent` `SendMessage` `ListAgents` `TaskStop` |
| Load skills | `skill` | `Skill` |
| Track a to-do list | `todowrite` | Not in the request |
| Schedule and wait | Not in the request | `CronCreate` `CronDelete` `CronList` `ScheduleWakeup` `Monitor` |
| Git worktrees | Not in the request | `EnterWorktree` `ExitWorktree` |
| Everything else | Not in the request | `NotebookEdit` `Workflow` `ReportFindings` `PushNotification` `DesignSync` |

- Headless runs (`claude -p` and `opencode run`, Claude Code 2.1.291 and OpenCode 1.18.34) in an empty git repository with default settings and no MCP servers, skills, or instruction files. Each of those adds tokens in both agents. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)
- Tokens were counted with Anthropic’s token counting endpoint against Opus 5.5. Interactive sessions can send a different tool set. [3](https://platform.claude.com/docs/en/build-with-claude/token-counting)
- This measures what each agent sends, not how well it codes. Task tokens, not fixed overhead, drive most of a session’s cost. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)

## What a month costs

| Model | Access | Cost per example session | At 200 sessions/month |
| --- | --- | --- | --- |
| Claude Opus 5.5 [2](https://platform.claude.com/docs/en/about-claude/pricing)[6](https://opencode.ai/docs/zen) | Either agent | $0.549 | $110 |
| Claude Sonnet 5.5 [2](https://platform.claude.com/docs/en/about-claude/pricing)[6](https://opencode.ai/docs/zen) | Either agent | $0.368 | $74 |
| GLM 5.3 [6](https://opencode.ai/docs/zen) | OpenCode only | $0.339 | $68 |
| Kimi K2.6 [6](https://opencode.ai/docs/zen) | OpenCode only | $0.220 | $44 |
| DeepSeek V4 Flash [6](https://opencode.ai/docs/zen) | OpenCode only | $0.035 | $7 |

| Flat plan | Access | Monthly |
| --- | --- | --- |
| OpenCode Go [7](https://opencode.ai/docs/go) | OpenCode only | $10 |
| Claude Pro [23](https://claude.com/pricing) | Claude Code only | $20 |
| Claude Team standard [23](https://claude.com/pricing) | Claude Code only | $25 |
| OpenCode Go Plus [7](https://opencode.ai/docs/go) | OpenCode only | $40 |
| Claude Max 5x [24](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) | Claude Code only | $100 |
| Claude Max 20x [24](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) | Claude Code only | $200 |

- One session is Anthropic’s published example: 1.2k input, 5.3k output, 940k cache-read, and 50k cache-write tokens. Real sessions vary, and other models may use more or fewer tokens for the same work. [25](https://code.claude.com/docs/en/costs)
- Flat plans are priced per person and have usage caps that aren’t published in tokens, so a plan may not cover a given number of sessions. Claude plans only work in Claude Code; Team standard needs at least 2 seats. OpenCode Go only serves open models. [24](https://support.claude.com/en/articles/11049741-what-is-the-max-plan)[23](https://claude.com/pricing)[7](https://opencode.ai/docs/go)[18](https://code.claude.com/docs/en/legal-and-compliance)
- Prices per million tokens from Anthropic and OpenCode Zen. Where Zen lists no cache-write price, cache writes are counted at the input rate. [2](https://platform.claude.com/docs/en/about-claude/pricing)[6](https://opencode.ai/docs/zen)

## OpenCode pricing

The agent is free and MIT-licensed. You pay for models.

- **Your own API key (Provider rates):** Anthropic, OpenAI, Bedrock, Vertex AI, OpenRouter and 75+ other providers bill you directly. Local models through Ollama, LM Studio, or llama.cpp cost nothing extra. [5](https://opencode.ai/docs/providers)
- **Existing subscription (What you already pay):** Sign in with ChatGPT Plus, GitHub Copilot, or GitLab Duo. Claude Pro and Max are not allowed. [5](https://opencode.ai/docs/providers)
- **Zen (Pay as you go):** Models from the OpenCode team at list price: Opus 5.5 is $4 in and $20 out per million tokens. Card fees of 4.4% + $0.30 are passed through. [6](https://opencode.ai/docs/zen)
- **Go ($10/mo):** Open models such as GLM, Kimi, DeepSeek, Qwen, and MiniMax, with 5-hour, weekly, and monthly caps. Go Plus raises the caps for $40/mo. [7](https://opencode.ai/docs/go)
- **Enterprise (Per seat):** Central config, SSO, and your own AI gateway. [8](https://opencode.ai/docs/enterprise)

## Claude Code pricing

A Claude plan or API usage. Claude Free doesn’t include Claude Code.

- **Pro ($20/mo):** Usage shared with Claude chat. $17/mo billed annually. [23](https://claude.com/pricing)
- **Max 5x and 20x ($100 or $200/mo):** 5× or 20× Pro usage per session, with five-hour resets and a weekly limit. [24](https://support.claude.com/en/articles/11049741-what-is-the-max-plan)
- **Team standard ($25/seat/mo):** $20 billed annually. Includes SSO and central billing. [23](https://claude.com/pricing)
- **Enterprise ($20/seat + usage):** Usage billed at API rates. Adds SCIM, audit logs, and IP allowlisting. [23](https://claude.com/pricing)
- **API key or cloud provider (Per token):** Anthropic API, Amazon Bedrock, Google Cloud Agent Platform, or Microsoft Foundry. Opus 5.5 is $4 in and $20 out per million tokens. [26](https://code.claude.com/docs/en/third-party-integrations)[2](https://platform.claude.com/docs/en/about-claude/pricing)

## Adoption

| Month | OpenCode npm downloads | Claude Code npm downloads |
| --- | --- | --- |
| 2025-10 | 240,064 | 23,989,032 |
| 2025-11 | 294,694 | 21,571,991 |
| 2025-12 | 433,374 | 21,551,967 |
| 2026-01 | 1,240,590 | 27,575,444 |
| 2026-02 | 1,560,054 | 30,510,428 |
| 2026-03 | 2,496,914 | 44,445,736 |
| 2026-04 | 4,989,634 | 49,361,496 |
| 2026-05 | 5,919,770 | 34,562,178 |
| 2026-06 | 9,013,471 | 44,038,610 |
| 2026-07 | 9,112,513 | 49,100,543 |
| 2026-08 | 10,462,032 | 82,199,042 |
| 2026-09 | 9,787,084 | 55,930,237 |

- **OpenCode:** 212,172 GitHub stars [34](https://api.npmjs.org/downloads/range/2025-10-01:2026-09-30/opencode-ai)[4](https://github.com/anomalyco/opencode)
- **Claude Code:** 149,692 GitHub stars [35](https://api.npmjs.org/downloads/range/2025-10-01:2026-09-30/@anthropic-ai/claude-code)[36](https://github.com/anthropics/claude-code)

npm counts include CI installs and updates, and miss Claude Code’s native installer and OpenCode’s install script and Homebrew. The anthropics/claude-code repository holds plugins and issues, not the agent’s source. Stars checked October 8, 2026.

## Which to pick

- **You pay for Claude Pro or Max — Claude Code:** Your plan only works here. Anthropic reserves subscription sign-in for Claude Code and its own apps. OpenCode needs an API key or another provider. [18](https://code.claude.com/docs/en/legal-and-compliance)[5](https://opencode.ai/docs/providers)
- **You want cheap or local models — OpenCode:** $10/mo, or free on your own hardware. OpenCode Go covers GLM, Kimi, DeepSeek, Qwen, and MiniMax. Ollama, LM Studio, and llama.cpp run models locally. [7](https://opencode.ai/docs/go)[5](https://opencode.ai/docs/providers)
- **You want the leanest prompt — OpenCode:** 10.5k vs 29.2k tokens per request. Measured on the same model with default settings. Fewer fixed tokens leave more context for your code. [1](https://replicas.dev/resources/opencode-vs-claude-code#overhead)
- **You want runs in the cloud — Claude Code:** Hosted sessions and routines. Cloud sessions run in Anthropic-managed VMs on Pro, Max, Team, and eligible Enterprise seats. Routines start them on a schedule, an API call, or a GitHub event. OpenCode has no hosted option. [30](https://code.claude.com/docs/en/claude-code-on-the-web)[31](https://code.claude.com/docs/en/routines)[15](https://opencode.ai/docs/server)
- **You want a sandbox on your laptop — Claude Code:** Built-in OS sandbox. Off by default; turn it on with /sandbox on macOS, Linux, or WSL2. OpenCode documents no sandbox, so run it in a container or VM. [28](https://code.claude.com/docs/en/sandboxing)[10](https://opencode.ai/docs/permissions)
- **Your team uses several providers — OpenCode:** One agent across providers. Zen workspaces add roles, per-member spending limits, and admin control over which models are enabled. [6](https://opencode.ai/docs/zen)

## Features: Openness and models

| Feature | OpenCode | Claude Code |
| --- | --- | --- |
| Open-source agent [4](https://github.com/anomalyco/opencode)[33](https://github.com/anthropics/claude-code/blob/main/LICENSE.md) | MIT-licensed, from Anomaly. | The repository license reads “All rights reserved.” |
| Model choice [5](https://opencode.ai/docs/providers)[26](https://code.claude.com/docs/en/third-party-integrations)[19](https://code.claude.com/docs/en/llm-gateway) | 75+ providers through the AI SDK and Models.dev, plus Ollama, LM Studio, and llama.cpp. | From Anthropic, Amazon Bedrock, Google Cloud Agent Platform, or Microsoft Foundry. Gateways can’t route to non-Claude models. |
| Claude Pro or Max sign-in [5](https://opencode.ai/docs/providers)[18](https://code.claude.com/docs/en/legal-and-compliance) | OpenCode’s docs say Anthropic prohibits it; the plugins were unbundled in 1.3.0. | Pro, Max, Team, and Enterprise plans include Claude Code. |
| Other subscriptions [5](https://opencode.ai/docs/providers)[18](https://code.claude.com/docs/en/legal-and-compliance) | Sign in with ChatGPT Plus, GitHub Copilot, or GitLab Duo. | Only Claude plans and API keys. |
| Instruction files [11](https://opencode.ai/docs/rules)[29](https://code.claude.com/docs/en/memory) | AGENTS.md. 1.x falls back to CLAUDE.md; 2.x reads AGENTS.md only. | Reads AGENTS.md when no CLAUDE.md exists (v2.1.277 or later). |

## Features: Safety defaults

| Feature | OpenCode | Claude Code |
| --- | --- | --- |
| Approval rules [10](https://opencode.ai/docs/permissions)[27](https://code.claude.com/docs/en/permission-modes) | Most actions default to allow. Auto mode approves anything not explicitly denied. | Auto mode, the default for terminal and VS Code sessions since v2.1.283, has a classifier review each action. |
| OS sandbox [10](https://opencode.ai/docs/permissions)[28](https://code.claude.com/docs/en/sandboxing) | Run it in a container or VM for isolation. | Turn it on with /sandbox on macOS, Linux, or WSL2. |

## Features: Interfaces and tools

| Feature | OpenCode | Claude Code |
| --- | --- | --- |
| Desktop app [4](https://github.com/anomalyco/opencode)[17](https://code.claude.com/docs/en/overview) | The README labels the desktop app beta. | Desktop app alongside terminal, browser, and IDEs. |
| Editors [14](https://opencode.ai/docs/acp)[17](https://code.claude.com/docs/en/overview) | A VS Code-family extension, plus ACP editors such as Zed and JetBrains IDEs. | VS Code and JetBrains extensions. |
| Phone [17](https://code.claude.com/docs/en/overview) | No mobile client is documented. | Available in the Claude mobile apps. |
| Subagents [9](https://opencode.ai/docs/agents)[20](https://code.claude.com/docs/en/sub-agents) | Build and Plan primary agents; 2.x drops Scout. | Custom subagents set their own prompt, tools, and permissions. |
| Language servers [12](https://opencode.ai/docs/lsp)[22](https://code.claude.com/docs/en/tools-reference) | Off by default. | The LSP tool needs a code intelligence plugin and doesn’t run in cloud sessions. |
| MCP [13](https://opencode.ai/docs/mcp-servers)[21](https://code.claude.com/docs/en/mcp) | Configured under `mcp` in opencode.json. | Added with `claude mcp add`. |

## Features: Hosting and automation

| Feature | OpenCode | Claude Code |
| --- | --- | --- |
| Vendor-hosted sessions [15](https://opencode.ai/docs/server)[30](https://code.claude.com/docs/en/claude-code-on-the-web) | Run `opencode serve` on your own machine. | Anthropic-managed VMs on Pro, Max, Team, and eligible Enterprise seats. |
| Scheduled runs [31](https://code.claude.com/docs/en/routines) | Use your own scheduler or CI. | On a schedule, an API call, or a GitHub event. |
| GitHub [16](https://opencode.ai/docs/github)[32](https://code.claude.com/docs/en/github-actions) | Comment /opencode or /oc; it runs on GitHub Actions and can open a PR. | Mention @claude in an issue or PR comment. |

## Run both on the same task

The overhead above says nothing about which agent writes the better patch on your code. The only way to know is to run both.

- **Share one instruction file:** Put your conventions in AGENTS.md. OpenCode reads it natively, and Claude Code reads it when there’s no CLAUDE.md. [11](https://opencode.ai/docs/rules)[29](https://code.claude.com/docs/en/memory)
- **Use the same model:** Point OpenCode at Claude through an API key so the harness is the only difference. [5](https://opencode.ai/docs/providers)
- **Start from the same state:** Same commit, same dependencies, clean environment, the same three to five closed issues with known-good fixes.
- **Compare the pull requests:** Judge the diffs, the tests each one ran, and how long review took.

Disclosure: Replicas publishes this comparison and supports both harnesses. It runs OpenCode, Claude Code, Codex, and Cursor in a dedicated Linux VM per task, so your team can send the same task to each and review both pull requests side by side. Try both on Replicas: https://app.replicas.dev/auth?mode=signup

## FAQ

### Is OpenCode free?
Yes. OpenCode is MIT-licensed. You pay only for models: your own provider keys, a ChatGPT Plus, GitHub Copilot, or GitLab Duo subscription, a Zen balance, or OpenCode Go at $10/month. Local models cost nothing extra.

### Can I use my Claude Pro or Max subscription with OpenCode?
No. OpenCode’s docs say Anthropic prohibits the plugins that connected Claude Pro or Max, and OpenCode stopped bundling them in 1.3.0. Use an Anthropic API key, a cloud provider, or Zen instead.

### Should I pick OpenCode or Claude Code?
Pick Claude Code if you already pay for Claude Pro or Max, want hosted cloud sessions and scheduled routines, or want a built-in sandbox on your laptop. Pick OpenCode if you want cheap or local models, one agent across several providers, or the leanest prompt. To settle it for your codebase, give both the same tasks on the same model and compare the pull requests.

### Is OpenCode cheaper than Claude Code?
On the same Claude model, OpenCode sends fewer fixed tokens per request (10,468 against 29,220 in our test), but the difference is cents per session once cached. The bigger factor is how you pay: a Claude plan only works in Claude Code, while OpenCode can use cheaper models through Go, your own keys, or local hardware.

### Does OpenCode read CLAUDE.md?
OpenCode 1.x reads a project CLAUDE.md when there’s no AGENTS.md and loads skills from ~/.claude/skills/. OpenCode 2.x reads AGENTS.md only. Claude Code reads AGENTS.md when there’s no CLAUDE.md, so AGENTS.md is the one file both use.

### Does OpenCode have a cloud version like Claude Code on the web?
No. OpenCode doesn’t host sessions. Run its server on your own machine, use its GitHub or GitLab integrations on your CI runners, or use a managed platform such as Replicas.

### How did you measure the token overhead?
We ran each agent headless (Claude Code 2.1.291, OpenCode 1.18.34) against a local endpoint that recorded the first request instead of forwarding it, using an empty git repository and default settings. We then counted the system prompt, tool definitions, and injected context with Anthropic’s token counting endpoint for Opus 5.5.

## Sources

1. [Replicas measurement: first request captured from each agent](https://replicas.dev/resources/opencode-vs-claude-code#overhead) (Replicas)
2. [Claude API pricing](https://platform.claude.com/docs/en/about-claude/pricing) (Anthropic)
3. [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) (Anthropic)
4. [anomalyco/opencode repository and license](https://github.com/anomalyco/opencode) (GitHub)
5. [OpenCode providers](https://opencode.ai/docs/providers) (OpenCode)
6. [OpenCode Zen](https://opencode.ai/docs/zen) (OpenCode)
7. [OpenCode Go](https://opencode.ai/docs/go) (OpenCode)
8. [OpenCode Enterprise](https://opencode.ai/docs/enterprise) (OpenCode)
9. [OpenCode agents](https://opencode.ai/docs/agents) (OpenCode)
10. [OpenCode permissions](https://opencode.ai/docs/permissions) (OpenCode)
11. [OpenCode rules (AGENTS.md)](https://opencode.ai/docs/rules) (OpenCode)
12. [OpenCode LSP servers](https://opencode.ai/docs/lsp) (OpenCode)
13. [OpenCode MCP servers](https://opencode.ai/docs/mcp-servers) (OpenCode)
14. [OpenCode IDE and ACP support](https://opencode.ai/docs/acp) (OpenCode)
15. [OpenCode server](https://opencode.ai/docs/server) (OpenCode)
16. [OpenCode GitHub integration](https://opencode.ai/docs/github) (OpenCode)
17. [Claude Code overview](https://code.claude.com/docs/en/overview) (Anthropic)
18. [Claude Code legal and compliance](https://code.claude.com/docs/en/legal-and-compliance) (Anthropic)
19. [Claude Code LLM gateway configuration](https://code.claude.com/docs/en/llm-gateway) (Anthropic)
20. [Claude Code subagents](https://code.claude.com/docs/en/sub-agents) (Anthropic)
21. [Claude Code MCP](https://code.claude.com/docs/en/mcp) (Anthropic)
22. [Claude Code tools reference](https://code.claude.com/docs/en/tools-reference) (Anthropic)
23. [Claude plans and pricing](https://claude.com/pricing) (Anthropic)
24. [Claude Max plan tiers and pricing](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) (Anthropic)
25. [Manage Claude Code costs](https://code.claude.com/docs/en/costs) (Anthropic)
26. [Claude Code on third-party platforms](https://code.claude.com/docs/en/third-party-integrations) (Anthropic)
27. [Claude Code permission modes](https://code.claude.com/docs/en/permission-modes) (Anthropic)
28. [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing) (Anthropic)
29. [Claude Code memory and CLAUDE.md](https://code.claude.com/docs/en/memory) (Anthropic)
30. [Use Claude Code in the cloud](https://code.claude.com/docs/en/claude-code-on-the-web) (Anthropic)
31. [Claude Code routines](https://code.claude.com/docs/en/routines) (Anthropic)
32. [Claude Code GitHub Actions](https://code.claude.com/docs/en/github-actions) (Anthropic)
33. [anthropics/claude-code license](https://github.com/anthropics/claude-code/blob/main/LICENSE.md) (GitHub)
34. [opencode-ai download counts](https://api.npmjs.org/downloads/range/2025-10-01:2026-09-30/opencode-ai) (npm)
35. [@anthropic-ai/claude-code download counts](https://api.npmjs.org/downloads/range/2025-10-01:2026-09-30/@anthropic-ai/claude-code) (npm)
36. [anthropics/claude-code repository](https://github.com/anthropics/claude-code) (GitHub)

## Related docs


