Claude Code vs OpenCode: Is That 33k-Token Preamble Worth It?
A teardown of Claude Code vs OpenCode shows why token count alone misleads on cost — caching behavior actually decides the real bill.
A teardown comparing Claude Code and OpenCode found that Claude Code sends roughly 33,000 tokens of scaffolding before even a trivial prompt reaches the model, versus about 7,000 for OpenCode. Most of that gap comes from tool schemas: Claude Code exposes 27 tools covering an orchestration layer — subagent delegation, cron jobs, worktree management — rather than just code editing, while OpenCode ships 10 tools and a much smaller system prompt.
Raw token count turns out to be a poor proxy for actual cost. What really determines the bill is caching behavior: OpenCode's request prefix stays byte-identical across turns, so the prompt cache holds and the overhead is paid once. Claude Code, by contrast, rewrites large portions of its cached context mid-session, generating far more expensive cache-write tokens over time. On multi-step tasks, Claude Code's batching sometimes made the whole-task total cheaper than OpenCode's repeated smaller turns — but when subagents were spawned, the same setup multiplied token usage several-fold instead.
For engineers evaluating agent harnesses, the actionable move isn't debating baseline size but measuring three numbers: the fixed floor via a proxied trivial request, the cache-write rate across a multi-turn session, and the whole-task token total on a representative workload. Whether a large preamble pays off depends entirely on whether that extra tool surface actually gets used and whether the cache stays stable.