OpenCodevsClaude Code
Same model, different harness
Every request an agent makes carries its system prompt and tool definitions. We captured the first request from each agent on the same model to see how much that is.
- OpenCode10,468 tokens
system prompt 2,917 · tool definitions 7,551 · 10 tools
- Claude Code29,220 tokens
system prompt 1,965 · tool definitions 23,907 · injected context 3,348 · 23 tools
- Claude Code sends 2.8× as many tokens before your first message: 29,220 against 10,468.[1][3]
- Tool definitions are most of the gap. Claude Code sends 23 tools, OpenCode sends 10.[1]
- 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][2]
- OpenCode also sends a separate 788-token request to a small Claude model to title each new session.[1]
| Job | OpenCode10 tools | Claude Code23 tools |
|---|---|---|
| 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 -pandopencode 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] - Tokens were counted with Anthropic’s token counting endpoint against Opus 5.5. Interactive sessions can send a different tool set.[3]
- This measures what each agent sends, not how well it codes. Task tokens, not fixed overhead, drive most of a session’s cost.[1]
What a month costs
Set your team size and how many agent sessions each person runs a month. Each per-token option is priced on the same session, and flat plans sit alongside.
For 1 person at 200 sessions each a month, the cheapest option is DeepSeek V4 Flash at $6.99.
DeepSeek V4 Flash[6]Per token
$6.99/moOpenCode Go[7]Flat, with caps
$10/moClaude Pro[23]Flat, with caps
$20/moOpenCode Go Plus[7]Flat, with caps
$40/moKimi K2.6[6]Per token
$44/moGLM 5.3[6]Per token
$68/moClaude Sonnet 5.5[2][6]Per token
$74/moClaude Max 5x[24]Flat, with caps
$100/moClaude Opus 5.5[2][6]Per token
$110/moClaude Max 20x[24]Flat, with caps
$200/mo
- 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]
- 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][23][7][18]
- 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][6]
Adoption
OpenCode is growing much faster from a smaller base. Claude Code still has far more npm downloads.
40.8×
npm downloads, Sep 2026 vs Oct 2025: 9.8M a month, up from 240.1K.[34]
212,172 GitHub stars[4]
2.3×
npm downloads, Sep 2026 vs Oct 2025: 55.9M a month, up from 24M.[35]
149,692 GitHub stars[36]
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.
Features
Both edit files, run commands, and support MCP, skills, subagents, and custom agents.
Openness and models
Safety defaults
Interfaces and tools
Hosting and automation
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.
- 01
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][29]
- 02
Use the same model
Point OpenCode at Claude through an API key so the harness is the only difference.[5]
- 03
Start from the same state
Same commit, same dependencies, clean environment, the same three to five closed issues with known-good fixes.
- 04
Compare the pull requests
Judge the diffs, the tests each one ran, and how long review took.
Common questions
Sources and methodology
The token overhead is our own measurement. We ran each agent headless against a local endpoint that recorded its first request instead of forwarding it, then counted the parts with Anthropic’s token counting endpoint. Everything else comes from vendor documentation, pricing pages, npm, and GitHub, checked on October 8, 2026.
OpenCode has two release lines: 1.x (opencode-ai on npm) and 2.x (@opencode/cli). Rows describe 1.x unless they say otherwise. Prices and plans change often, so confirm with the vendor before you buy.
Replicas publishes this comparison and supports both harnesses. If you spot an error, email founders@replicas.dev and we'll fix it.
- 1Replicas measurement: first request captured from each agent · Replicas
- 2Claude API pricing · Anthropic
- 3Token counting · Anthropic
- 4anomalyco/opencode repository and license · GitHub
- 5OpenCode providers · OpenCode
- 6OpenCode Zen · OpenCode
- 7OpenCode Go · OpenCode
- 8OpenCode Enterprise · OpenCode
- 9OpenCode agents · OpenCode
- 10OpenCode permissions · OpenCode
- 11OpenCode rules (AGENTS.md) · OpenCode
- 12OpenCode LSP servers · OpenCode
- 13OpenCode MCP servers · OpenCode
- 14OpenCode IDE and ACP support · OpenCode
- 15OpenCode server · OpenCode
- 16OpenCode GitHub integration · OpenCode
- 17Claude Code overview · Anthropic
- 18Claude Code legal and compliance · Anthropic
- 19Claude Code LLM gateway configuration · Anthropic
- 20Claude Code subagents · Anthropic
- 21Claude Code MCP · Anthropic
- 22Claude Code tools reference · Anthropic
- 23Claude plans and pricing · Anthropic
- 24Claude Max plan tiers and pricing · Anthropic
- 25Manage Claude Code costs · Anthropic
- 26Claude Code on third-party platforms · Anthropic
- 27Claude Code permission modes · Anthropic
- 28Claude Code sandboxing · Anthropic
- 29Claude Code memory and CLAUDE.md · Anthropic
- 30Use Claude Code in the cloud · Anthropic
- 31Claude Code routines · Anthropic
- 32Claude Code GitHub Actions · Anthropic
- 33anthropics/claude-code license · GitHub
- 34opencode-ai download counts · npm
- 35@anthropic-ai/claude-code download counts · npm
- 36anthropics/claude-code repository · GitHub