DEV Community

Cover image for Claude Code burns 5x more tokens before you type a word. Here's where they go.
Andrew Kew
Andrew Kew

Posted on

Claude Code burns 5x more tokens before you type a word. Here's where they go.

Somebody finally put a logging proxy between the harnesses and the API and measured what actually goes over the wire. Systima did it, and the numbers are not subtle.

Claude Code opens a session with roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding. OpenCode, running the same model on the same machine, opens with about 7,000.

You haven't typed anything yet.

What actually goes in those 33k tokens

The breakdown is illuminating:

  • 27 tool schemas — Claude Code ships the full orchestration suite: background agents, CronCreate, Monitor, the Task family, worktree management, push notifications. OpenCode ships 10 core coding tools.
  • Three injected reminder blocks before your first message hits — agent type catalogue, available skills, user context.
  • A system prompt three times the size of OpenCode's even with all tools stripped: behavioural doctrine, tone rules, safety guidance, environment description.

OpenCode's first message is close to minimal: one system block, ten tools, your prompt.

The cache problem no one talks about

You'd think prompt caching neutralises all of this. Write once, read cheap. That's true if your prefix stays stable — and that's where the real gap is.

"OpenCode emitted byte-identical prefixes across every request and every run... Claude Code emitted three distinct request classes per session, each with its own cache entry. Its system bytes also varied between sessions in the same workspace."

On the same file-summarise task: Claude Code wrote 53,839 cache tokens across 5 requests, including one full mid-session re-write of its entire prefix. OpenCode wrote 1,003.

They tested on two model families. Same pattern both times. The gap ran from 5.9x to 54x depending on cache temperature. Cache writes bill at a premium — 1.25x for the 5-minute tier — which explains why the usage dashboard climbs even on simple tasks.

The multipliers stack fast

A baseline comparison undersells the real cost in production. The multipliers:

  • Your instruction file (AGENTS.md / CLAUDE.md) adds ~20,000 tokens to every single request, for both harnesses equally. A 72KB production AGENTS.md nearly quadruples OpenCode's lean baseline.
  • MCP servers run ~1,000–1,400 tokens per server per request. Five modest servers add 5,000–7,000 tokens before any task work.
  • Subagents are the big one. The same task that cost 121,000 tokens done directly cost 513,000 tokens fanned out to two subagents — a 4.2x multiplier. Each subagent re-reads its own full bootstrap on every turn it takes.

By the time a real working setup sends its first request, you're 75,000–85,000 tokens deep before the user typed anything. That's 40%+ of a 200k context window, every single request.

The one place Claude Code wins (sort of)

On a multi-step write-run-test-fix task, Claude Code batched all tool calls into a single parallel round trip (3 requests total). OpenCode made one tool call per turn and took 9. The totals converged: ~121k vs ~132k.

But: re-run on a newer model, that advantage disappeared. Claude Code took 6 requests instead of 3, landed at ~298k tokens against OpenCode's 133k. The batching is model behaviour, not a harness guarantee.

What to do

  • Watching your API spend climb on Claude Code? Check subagent usage first. One fan-out can 4x your session cost silently.
  • Heavy instruction files? Know that 72KB of CLAUDE.md adds 20k tokens to every single request. Trim ruthlessly. The overhead is symmetrical — OpenCode pays the same tax.
  • Relying on prompt cache savings? Verify your prefix is actually stable at the API boundary. A mid-session cache re-write can cost more than you saved all session.
  • Evaluating harnesses for production? Instrument at the API boundary, not in the dashboard. The dashboard gives you totals; the wire gives you where.

The model isn't the cost driver. The harness, the config, and what you do with subagents are.


Source: Systima — Claude Code vs OpenCode: Token Overhead

✏️ Drafted with KewBot (AI), edited and approved by Drew.

Top comments (0)