OpenCode vs Claude Code: models, pricing and cost, measured on one machine

Pick OpenCode to choose the model per task: it is free, open source and connects to more than 75 providers. Pick Claude Code for Claude on a flat plan from $20 a month, which OpenCode may not use. On one machine the median OpenCode call cost $0.002, mostly on DeepSeek V4 Pro, and the median Claude Code call $0.094. Prices read 10 October 2026.

Dmitriy Solodukha · checked against Caprock v0.95.0

median OpenCode call
$0.002
median OpenCode call
9,309 calls, May–Jun 2026 · 84% DeepSeek V4 Pro, 16% MiniMax M3
median Claude Code call
$0.094
median Claude Code call
79,014 calls, 18 Jul – 2 Oct 2026 · mostly Opus 5 and 4.8
median Claude Code day at list prices
$153
median Claude Code day at list prices
OpenCode's median day: $2
OpenCode itself
$0
OpenCode itself
you pay for the model

A call is one request to the model. OpenCode's costs are its own; Claude Code's are at Anthropic's list prices. The two ran months apart on different models — not a verdict on code quality.

The short answer

Pick OpenCode or Claude Code

Pick OpenCode if…

  • You want to choose the model per task: OpenCode connects to more than 75 providers.
  • You want an open-source agent that costs nothing itself; you pay the provider, or sign in with ChatGPT Plus, GitHub Copilot or GitLab Duo.
  • You want a cheap open model: the median OpenCode call here cost $0.002 on DeepSeek V4 Pro and MiniMax M3.

Pick Claude Code if…

  • You want Claude on a flat fee: Pro at $20, Max at $100 or $200. A Claude plan does not work in OpenCode.
  • You use Claude all day: the median Claude Code day here came to $153 at list prices, which a plan covers inside its limits.
  • You want Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry.

Facts about price, models and where each runs, read 10 October 2026. Not a verdict on which writes better code.

Side by side

OpenCode vs Claude Code, side by side

OpenCode and Claude Code, from each one's documentation, read 10 October 2026
OpenCodeClaude Code
Made byAnomalyAnthropic
What it isAn agent for the terminalAn agent for the terminal and IDEs
Where it runsTerminal, desktop app, IDE extensionTerminal, IDE extensions, desktop app, web
Models75+ providers, plus Zen and GoClaude only
Open sourceYes, MITNo
Cheapest way inFree; you pay for the modelClaude Pro, $20 a month
BilledBy the provider, Zen or GoPlan fee in usage limits, or per token
Installnpm, Homebrew, script, Windows managersInstaller, npm, Homebrew, WinGet, apt, dnf, apk
Read by CaprockYes, every sessionYes, every session
Claude viaAPI key, Zen, or Haiku 5.5 on GoAnthropic, Bedrock, Google Cloud, Foundry
Claude Pro/Max sign-inNot allowed by AnthropicYes

Plans, per month

OpenCode pricing vs Claude Code pricing

Monthly price on one axis. OpenCode itself is free; the plans pay for models.

OpenCode

  • OpenCode$0free, open source
  • OpenCode Go$10mostly open models; capped per model
  • OpenCode Go Plus$40the same models, higher caps
  • OpenCode Zen — per request · prepaid credit
  • Your own key — the provider's price

Claude Code

  • Claude Pro$20$17 billed annually
  • Team, standard seat$25$20 billed annually
  • Claude Max 5×$1005× Pro's usage
  • Team, premium seat$125$100 billed annually
  • Claude Max 20×$20020× Pro's usage
  • Claude Free — no Claude Code
  • Enterprise — $20 a seat + usage at API rates
  • API key — per token

Both columns share one axis, $0 to $200 a month. Read 10 October 2026 from OpenCode's Zen and Go docs and claude.com/pricing.

Usage limits

Usage limits on each

How OpenCode and Claude Code cap use, read 10 October 2026
OpenCodeClaude Code
How usage is cappedGo: dollar caps per modelFive-hour window and a weekly limit
Size publishedYes, in dollars, on GoOnly relative: 5× or 20× Pro
Weekly limitGo: half the monthly capYes, across all models
Past the limitWait, or use Zen or your own keyWait, usage credits, or an API key
Five hoursGo: a fifth of the monthly capYes, every plan
On an API keyBilled by the providerBilled per token
OpenCode's limits apply to Go; Zen and your own key bill per request or token instead.

Per million tokens

Per-token prices of the models measured

Per million tokens. Claude in OpenCode costs the same as on an API key; Zen lists Claude at Anthropic's rates.

API prices per million tokens, read 10 October 2026
ModelInputCache readOutput
Claude Opus 5.5$4$0.20$20
Claude Opus 5$5$0.50$25
Claude Sonnet 5.5$2$0.10$10
DeepSeek V4 Prooff-peak to peak; off-peak is half$0.66–1.32$0.022–0.044$1.98–3.96
Read 10 October 2026 from Anthropic's and DeepSeek's API pricing pages. DeepSeek's peak hours are 01:00–04:00 and 06:00–10:00 UTC on weekdays. MiniMax M3 is not on this table.

Measured · read 3 October 2026

What each cost on one machine

Caprock reads OpenCode's database and Claude Code's transcripts into one table. The samples are months apart, on different models — the dates are on each bar.

OpenCode
9,309 calls on 21 active days, May – Jun 202684% DeepSeek V4 Pro, 16% MiniMax M3
Claude Code
79,014 calls on 56 active days, 18 Jul – 2 Oct 2026mostly Opus 5 and Opus 4.8

Median cost per call

  • OpenCodeMay – Jun 2026$0.002
  • Claude Code18 Jul – 2 Oct 2026$0.094
OpenCode's own cost; Claude Code at Anthropic's list prices.

Median active day

  • OpenCodeMay – Jun 2026$2
  • Claude Code18 Jul – 2 Oct 2026$153
The median OpenCode session cost four cents.

Cost per million tokens, every kind

  • OpenCodeMay – Jun 2026$0.05its DeepSeek V4 Pro calls
  • Claude Code18 Jul – 2 Oct 2026$0.63its Opus 5 calls
Cache reads, writes, input and output together. DeepSeek V4 Pro reads its cache at $0.022–0.044 per million; Opus 5 at $0.50.

Median context per call

  • OpenCodeMay – Jun 2026298K
  • Claude Code18 Jul – 2 Oct 2026169K
The OpenCode calls carried more context and still cost less.

Cache hit

  • OpenCodeMay – Jun 202698.7%
  • Claude Code18 Jul – 2 Oct 202698.8%
Share of input read from the cache.

What the tool calls were

  • OpenCodeMay – Jun 2026
  • Claude Code18 Jul – 2 Oct 2026
ShareOpenCodeClaude Code
Bash39%57%
Read26%11%
Edit23%7%
Everything else12%25%
Share of tool calls.

Your own machine

Measure both on your machine.

Caprock is a free, open-source desktop app that keeps the ledger of OpenCode and Claude Code alike, the sessions you start in your own terminal included: who is waiting on you, who is stuck, how close each plan is to its limit, and each pull request with what it cost, at list price. Run them in its tabs or in your own terminal. Local; no account. It reads OpenCode's own database read-only, so sessions you start elsewhere show up too.

Download for Mac

Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.

Or run it yourself:

curl -fsSL https://caprock.dev/mac.sh | sh

Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app

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

Try it

The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.

Download for Mac

Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.

Or run it yourself:

curl -fsSL https://caprock.dev/mac.sh | sh

Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app