A detailed empirical comparison of token consumption between Claude Code and OpenCode, measured at the API boundary using a logging proxy. Claude Code's baseline overhead is ~33,000 tokens per request vs OpenCode's ~7,000, driven by 27 tool schemas and injected scaffolding. Cache instability in Claude Code causes 5.9x–54x more cache writes than OpenCode on identical tasks. Real-world configurations (instruction files, MCP servers, subagents) can push first-request overhead to 75,000–90,000 tokens. Subagent fan-out multiplies costs dramatically: a 121k-token direct task ballooned to 513k tokens with two subagents. One counterpoint: Claude Code's parallel tool batching can make multi-step tasks cheaper than OpenCode's serial one-call-per-turn approach. The post includes methodology details, caveats, and instructions for reproducing the measurement rig.

•15m read time•From systima.ai
Post cover image
Table of contents
Why measure this at allMethodPart I. The floorPart II. The multipliersThe cache economics, honestlyDogfooding, or the benchmark dataset as an audit logCaveatsReproducing it

Questions this post answers

How much token overhead does Claude Code add compared to OpenCode before processing a prompt?

Claude Code sends roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding before a prompt is even processed, compared to about 7,000 tokens for OpenCode on the same claude-sonnet-4-5 model. Most of the gap comes from tool schemas: roughly 24,000 of Claude Code's tokens are tool definitions (27 tools including an orchestration and subagent suite) versus about 4,800 for OpenCode's 10 tools. Track token overhead like this when comparing agent harnesses for a production coding setup on daily.dev.

Why does Claude Code write so many more prompt cache tokens than OpenCode on the same task?

Claude Code's request prefix is unstable across a session, with distinct prefixes for a warmup probe, the main conversation, and subagent calls, causing it to rewrite tens of thousands of cache tokens mid-session. On a matched file-summarize task Claude Code wrote 53,839 cache tokens versus 1,003 for OpenCode, whose byte-identical prefix let it cache once and read cheaply, a gap ranging from 5.9x to 54x depending on cache temperature. Understanding cache-write instability helps developers budgeting for agentic coding costs on daily.dev.

How much do subagents increase token cost when using Claude Code?

Fanning a task out to two parallel subagents in Claude Code increased cumulative metered input from about 121,000 tokens (done directly) to 513,000 tokens, a 4.2x multiplier, because each of the five resulting subagent calls pays its own bootstrap cost of a 3,554-character system prompt plus 24 of 27 tools, and the parent then ingests every subagent's transcript. Developers weighing subagent delegation against direct execution can weigh trade-offs like these via daily.dev.

Share this post