The full guide
OpenCode vs Claude Code, step by step
OpenCode is an open-source coding agent that runs models from more than 75 providers; Claude Code is Anthropic's and runs Claude. The model you choose decides most of the cost. On my machine, which has run both, the median OpenCode call cost $0.002, mostly on DeepSeek V4 Pro, and the median Claude Code call $0.094 — though the OpenCode calls carried more context.
OpenCode pricing vs Claude Code pricing
OpenCode costs nothing itself. You pay for the model, three ways: your own API key for a provider — DeepSeek, OpenAI, Anthropic and so on — billed by that provider; OpenCode Zen, a pay-as-you-go gateway to tested models, billed per request from prepaid credit, with a few models free; or OpenCode Go, a subscription to mostly open models plus Claude Haiku 5.5, whose dollar caps per model reset over five hours, a week and a month. Every Go plan, the Zen rates and what an OpenCode call costs: OpenCode pricing.
Claude Code comes with a Claude plan or bills an API key per token. Every plan and its limits: Claude Code pricing.
Can I use my Claude Code subscription (Pro or Max) in OpenCode?
Not legitimately. OpenCode's providers page says plugins that let OpenCode use a Claude Pro/Max plan exist, that "Anthropic explicitly prohibits this", and that OpenCode stopped bundling them in version 1.3.0. Claude Code's own documentation reserves subscription sign-in for ordinary use of Claude Code and Anthropic's other native apps, and says third-party developers may not route requests through Free, Pro or Max credentials on behalf of their users.
So Claude inside OpenCode is billed per token — an Anthropic API key, or Zen, which lists Claude at the same rates as Anthropic's list: Opus 5.5 at $4 input and $20 output per million. What a Claude call costs at those rates, model by model: Claude API pricing.
What each cost on one machine
Caprock reads OpenCode's database and Claude Code's transcripts into the same table. OpenCode's figures are its own — it computes the cost and Caprock passes it through; Claude Code's are priced at Anthropic's list prices. A call is one request to the model, counted the same way on both sides. Read on 3 October 2026: 9,309 OpenCode calls on 21 days in May and June 2026, 84% of them on DeepSeek V4 Pro and 16% on MiniMax M3, and 79,014 Claude Code calls on 56 days, 18 July to 2 October 2026.
The OpenCode calls cost less while carrying more context — 298K tokens at the median against 169K — because of the price of the cache. Both agents re-read almost everything from it, and DeepSeek V4 Pro lists a cache hit at $0.022–$0.044 per million where Opus 5 lists $0.50. Per million tokens of every kind, the DeepSeek calls came to $0.05 and Claude Code's Opus 5 calls to $0.63.
What this does not show: which model writes better code, or what the same task costs in each. The two ran in different months, on different projects, with different models, and DeepSeek V4 Pro is not Opus 5. It is what the work I actually gave each one cost, read the same way.
Which one to pick on cost
If you want Claude and use it all day, Claude Code on a Max plan: in OpenCode, Claude bills per token, and a median Claude Code day of mine came to $153 at list prices. If you want to choose the model per task, OpenCode: the bill follows the model, and on a cheap open model my median OpenCode session cost four cents. If you run both, add their usage up in one place to see the total.
Codex vs Claude Code makes the same comparison with OpenAI's agent.
Measure both on your machine
Caprock finds OpenCode through its own database, opened read-only, and Claude Code through its transcripts — nothing to configure, and sessions from before you installed it are included. Caprock's Home screen, its live view, filters by agent, the Cost screen adds both up, and caprock export writes every call of both:
$ caprock export events --format tsv --out events.tsv
Claude Code's dollars are a list-price estimate, as its own /usage is, beside the plan's dollars and the share of the weekly limit the work used; OpenCode's are its own figure. Free, open source; nothing leaves your machine. Install Caprock and it reads back every session both agents still have on disk, started in any terminal.
Questions people ask
- Is OpenCode free?
- OpenCode itself is free and open source. You pay for the model: your own provider key, OpenCode Zen per request, or OpenCode Go at $10 or $40 a month.
- Can I use my Claude Code subscription (Pro or Max) in OpenCode?
- No. OpenCode's docs say Anthropic explicitly prohibits it, and OpenCode stopped bundling those plugins in version 1.3.0. Claude in OpenCode is billed per token, or comes capped in OpenCode Go, which includes Claude Haiku 5.5.
- Is OpenCode cheaper than Claude Code?
- It depends on the model. On one machine the median OpenCode call, mostly on DeepSeek V4 Pro, cost $0.002, and the median Claude Code call $0.094 at list prices.
- Can OpenCode run Claude models?
- Yes, with an Anthropic API key or through OpenCode Zen, which lists Claude at Anthropic's rates: Opus 5.5 at $4 input and $20 output per million tokens. OpenCode Go includes Claude Haiku 5.5 under a dollar cap.
- Which models does OpenCode support?
- OpenCode connects to more than 75 providers by API key, plus its own Zen and Go gateways. Claude Code runs Claude models only.
- Which is better, OpenCode or Claude Code?
- Neither across the board. OpenCode suits you if you want to pick the model and provider per task, open source; Claude Code if you want Claude on a flat Claude plan, which OpenCode may not use. This page compares price and models, not code quality.
- Can I see OpenCode and Claude Code costs in one place?
- Yes. Caprock, a free desktop app, reads OpenCode's own database and Claude Code's sessions on your machine, whether or not it started them, and prices every call, per session and per repository.
Sources
- OpenCode docs, read 10 October 2026
- OpenCode docs — providers (Anthropic section), re-read 20 October 2026
- OpenCode Zen — models and prices
- OpenCode Go — plans
- Claude Code licence: all rights reserved
- Claude Code docs — authentication and credential use, re-read 20 October 2026
- Claude plans and prices, read 10 October 2026
- Claude Help Center — What is the Max plan?
- Anthropic API pricing, read 10 October 2026
- DeepSeek API pricing, read 10 October 2026
- How Caprock reads OpenCode
Try it
The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app