Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

654 points · 342 comments on HN · read original →

Points and comments are a snapshot, not live.

Claude Code uses 33,000 tokens of overhead vs. 7,000 for OpenCode before processing a user prompt.

The author measured token overhead by splicing a logging proxy between each harness and the model endpoint, using Claude Code 2.1.207 and OpenCode 1.17.18 on claude-sonnet-4-5. Claude Code's first-turn payload was about 32,800 tokens (27 tools, three system blocks, injected reminders) versus OpenCode's 6,900 (10 tools, one system block). Tool schemas dominate: 24,000 tokens for Claude Code vs. 4,800 for OpenCode. In a multi-step task, Claude Code's batching closed the gap (121,000 vs 132,000 tokens), but on a newer model (Fable) it reversed (298,000 vs 133,000). Instruction files add roughly 20,000 tokens per request; subagents multiply costs 4.2x. OpenCode emitted byte-identical prefixes across runs; Claude Code did not, leading to far more cache writes.

What commenters are saying

Several commenters criticized the methodology, noting the author's gateway added its own envelope and affected testing. One top comment questioned why the gateway required calibration requests and why it interfered with subagent and extended-thinking tests; the author replied the gateway is their standard auth route, not a test apparatus. Others observed that LLM providers are incentivized to increase token consumption, and that custom harnesses can be far more efficient. One commenter shared that writing their own agent in Emacs worked extremely well and was trivially customizable.