Back to UsageCut

Claude Code vs OpenCode: which one actually wastes fewer tokens?

9 min read

On this page

Claude Code really does send more tokens before it reads your first prompt than OpenCode does - a July 2026 benchmark puts the gap at roughly 33,000 tokens versus 7,000, wider once MCP servers are configured. But that startup payload is a one-time cache write, not a per-message tax: priced at Sonnet 5's published rates, the whole gap costs a few cents, once, not every turn. The number that actually decides a Claude Code bill sits somewhere the startup footprint never touches - how much unmanaged conversation keeps getting re-sent, and re-billed, on every turn after that.

TL;DR: Systima's benchmark (via a Hacker News thread that hit 538 points) measured Claude Code sending about 33k tokens before reading a prompt - up to roughly 75k with MCP servers configured - against OpenCode's ~7k baseline. Priced at Sonnet 5's published rates, that gap costs about $0.07-$0.17 as a one-time cache write, then a fraction of a cent per turn to keep carrying it forward. On this project's own 1,037 measured Claude Code sessions, cache-read and cache-write together - context already in the conversation getting re-sent or re-written - are 82% of the real dollar bill. A smaller startup footprint doesn't touch that.

Where does the "33k tokens before your first prompt" number come from?

The figure comes from a benchmark Systima published in July 2026, testing Claude Code and OpenCode against the same model on the same rig and measuring what each one sends before either tool reads a word the user typed. The result: Claude Code's baseline system prompt, CLAUDE.md, and tool registration land around 33,000 tokens; a configuration with several MCP servers wired in pushed that closer to 75,000. OpenCode's equivalent startup payload measured around 7,000 - about a fourth to a tenth the size, depending on which Claude Code figure gets compared. The post reached Hacker News the week of July 13, 2026, sat at 538 points with 303 comments, and got picked up by outlets covering AI tooling through mid-July.

That's a real, measured gap, not a marketing number, and it's worth being specific about what's actually in it before deciding what it means for a bill. Claude Code's startup context is the system prompt plus whatever's in a project's CLAUDE.md plus the registered names of every configured MCP server. Anthropic's own documentation is explicit that MCP tool definitions are deferred by default - only tool names enter context at start, with full schemas loading on first use - so a "75k with MCP loaded" figure likely reflects either a heavily-configured setup or a test that resolved every schema up front rather than a typical session's actual per-turn footprint. Neither the Hacker News thread nor the syndicated coverage details the exact test configuration, so treat 75k as closer to a worst case than a default one.

Is that gap a real dollar cost, or a one-time cached one?

Whatever the exact number, what happens to it next matters more than the number itself. Anthropic's caching documentation says prompt caching "reduces costs for repeated content like system prompts" - the startup payload gets written to cache once, on the first turn, then re-read at roughly a tenth of the input rate on every turn after that for as long as the cache stays warm. That isn't a fee charged per message - it's one write, then a small, flat per-turn add-on.

Priced at Sonnet 5's current published rates ($2/MTok input, $2.5/MTok cache write, $0.20/MTok cache read):

| | Startup tokens (Systima's benchmark) | One-time cache-write cost | Cost to carry it one more turn | | --- | ---: | ---: | ---: | | OpenCode | ~7,000 | $0.02 | $0.001 | | Claude Code (baseline) | ~33,000 | $0.08 | $0.007 | | Claude Code (MCP-loaded) | ~75,000 | $0.19 | $0.015 |

One-time cache-write cost of each startup payload

Sonnet 5 rates ($2.50/MTok cache write) applied to Systima's benchmarked token counts

OpenCode - 7K tokens$0.02
Claude Code (baseline) - 33K tokens$0.08
Claude Code (MCP-loaded) - 75K tokens$0.19

Carrying Claude Code's larger payload forward instead of OpenCode's for 30 turns adds $0.16-$0.41 in cumulative cache-read cost, on top of the one-time write above. Computed from the rates and token counts above, not a measured session.

Modeled over 30 turns - carrying Claude Code's larger startup payload instead of OpenCode's for the whole session - the cumulative extra cache-read cost comes to about $0.16 at the baseline figure, or $0.41 at the MCP-loaded one. That's the full dollar weight of the number the entire comparison gets built around: real, but small, and paid mostly once rather than compounding message after message the way an ongoing conversation does.

What does OpenCode's smaller footprint actually change - and what doesn't it touch?

OpenCode is Anomaly's open-source coding agent, built to run against any LLM provider a user configures an API key for, not just Anthropic's models. Some of its lighter startup number is genuinely a smaller built-in agent scaffold; some of it is structural - point OpenCode at a different provider and its prompt caching behavior, rates, and cache lifetime change with it, so the modeled math above only holds while both tools are actually running an Anthropic model. Claude Code doesn't have that variable: it always runs on Anthropic's models with one fixed, documented caching mechanic, which is exactly what makes a clean before/after calculation possible in the first place.

What neither tool's starting footprint changes is the mechanic that actually grows a bill. Claude Code's own docs put it plainly: it "sends your full conversation with every request," so "a one-line question in a session that has been open all day still draws usage for the whole conversation." OpenCode's agent loop needs the same growing history on every call to stay coherent - a lighter starting point doesn't cap how large that resend eventually gets, it just moves the starting line back a little. If MCP servers are a meaningful share of either tool's context, checking which ones are actually earning their keep does more for a real bill than the startup number ever will.

Where the real waste is instead, on this project's own measured sessions

Where a real Claude Code bill actually goes

Measured across 1,037 of this project's own sessions - not the startup payload, the whole bill

Cache-read 44%
Cache-write 37.8%
Output 15.9%
Fresh input 2.3%

Cache-read and cache-write together - 82% of the bill - are context that was already in the conversation getting re-sent or newly written. Only a sliver of either bucket is the one-time startup payload measured at session start; the rest is the conversation itself, growing turn by turn.

Across 1,037 of this project's own real Claude Code sessions, cache-read - everything already sitting in context getting billed again on the next turn - is 44% of total dollar cost. Cache-write, the cost of new content entering the cache for the first time, is another 38%. Output is 16%. The prompt actually typed is 2%, a rounding error next to what's already accumulated by the time it's sent. Cache-read and cache-write together are 82% of the bill, and only a sliver of either bucket is the one-time system-prompt-and-tool-schema payload measured at session start - the rest is the conversation itself, growing turn by turn. How caching and compaction actually work goes deeper on why that split looks the way it does.

Those 1,037 sessions average about $8.22 apiece at Opus rates. Even the worst-case $0.41 modeled startup-tax gap from the section above is about 5% of one average session's real cost - and it's a number paid mostly once, not a recurring one stacked onto every message the way cache-read is.

So should you switch tools to save tokens?

Does the startup gap actually matter for this session?

Many short, fresh sessions

CI jobs, scripted one-off runs, anything that restarts constantly

Startup gap repeats every run - OpenCode's lighter baseline genuinely adds up

One normal interactive session

Regular coding work, paid once near the start of the conversation

Gap shrinks to irrelevance against what accumulates afterward

For one shape of usage, the startup gap is a real, recurring cost: short-lived sessions that restart constantly - a CI job invoking a fresh agent per run, a scripted one-off task, anything that never gets far enough into a conversation to amortize the fixed cost of starting - pay that fixed tax every single time, and OpenCode's lighter baseline genuinely adds up there.

For a normal interactive coding session, it doesn't hold up the same way. The gap gets paid once near the start and shrinks to irrelevance against everything that accumulates afterward. Switching tools moves a few cents around while leaving the actual lever untouched: what stays in context turn after turn, and whether the exploratory reads that never lead to an edit get offloaded instead of re-read forever. When a subagent is worth its own overhead is the piece that actually moves a bill by double digits, on either tool.

Open provider choice and a different interface are real, legitimate reasons to reach for OpenCode - reasons that have nothing to do with token counts, and none of this argues against either one. What doesn't hold up is picking OpenCode specifically to fix Claude Code's token waste: the waste that actually dominates a real bill was never sitting in the startup payload.

Honest limits

This comparison prices one specific, narrow gap - the raw token difference at session start - using Sonnet 5's published rates; it doesn't model what happens if OpenCode runs against a cheaper or differently-priced provider, which is a legitimate reason to prefer it that has nothing to do with the math above. The 75k "MCP-loaded" figure is one benchmark's snapshot, not a guarantee: a setup with fewer or leaner MCP servers won't see anything close to that gap. And this piece deliberately skips feature-by-feature ground - plan mode, IDE integration, agent teams - that page 1's existing comparison posts already cover reasonably well; it exists to answer the one question they don't, which is what the headline number is actually worth in dollars.

FAQ

  • Does Claude Code really send 33,000+ tokens before reading my prompt? A July 2026 benchmark from Systima, syndicated via a Hacker News thread that reached 538 points, measured roughly 33k tokens for Claude Code's startup context against OpenCode's ~7k, and up to about 75k for Claude Code in a heavily MCP-loaded configuration. It's a real, measured gap in what enters context before the first message, not a marketing figure.
  • Does that gap cost extra on every message? No. Prompt caching writes that startup context to cache once and re-reads it at roughly a tenth of the input rate on later turns - a flat, small per-turn add-on, not a fee charged fresh each time.
  • Is OpenCode actually cheaper than Claude Code? For the specific startup-token number, yes. For a full session, it depends far more on which model or provider it's pointed at and how much unmanaged history accumulates than on that starting gap, which this project's own measured data shows is a small slice of a real bill.
  • Does switching to OpenCode fix Claude Code's token waste? Not the kind that dominates a real bill. Cache-read and cache-write together - context already in the conversation getting re-sent or re-written - are 82% of the dollar cost on this project's own measured sessions; a startup-footprint difference doesn't touch that.
  • When does OpenCode's smaller footprint actually matter? Mostly for short-lived, frequently-restarted sessions - CI jobs, scripted one-off runs, anything that never gets far enough into a conversation to amortize the fixed startup cost. A long interactive session pays that gap once and moves on.

Neither tool's starting number tells you what your own sessions actually cost or where that cost is coming from. The free scan reads your real Claude Code session history and shows the categorized breakdown behind your bill, instead of a modeled gap between two tools' first turns.

See your own numbers

These are aggregates from real sessions. Your setup is different - run the free scan and get the breakdown for your own Claude Code history. It runs locally; nothing about your code or prompts leaves your machine.

npx usagecutRun a free scan →

NeoMade by Neo

UsageCut by ClockedCode - not affiliated with Anthropic. The figures on this page are measured on real Claude Code sessions and labeled measured or estimated where it matters.