{"slug": "claude-code-token-overhead-4-7x-more-than-opencode", "title": "Claude Code Token Overhead: 4.7x More Than OpenCode", "summary": "A wire-level analysis by Systima found that Anthropic's Claude Code sends approximately 33,000 tokens to the API before processing any user prompt, 4.7 times more than OpenCode's ~7,000-token baseline, with tool schemas accounting for roughly 24,000 tokens. The analysis also revealed that Claude Code's cache behavior generates up to 54 times more cache-write tokens than OpenCode on identical tasks, compounding billing costs for enterprise users. The findings, based on a logging proxy with cryptographic verification, sparked discussion on Hacker News where an engineering lead reported $400,000 in annual burn from system prompt wastage.", "body_md": "A [wire-level analysis by Systima](https://systima.ai/blog/claude-code-vs-opencode-token-overhead) published this week found that Claude Code sends approximately 33,000 tokens to Anthropic’s API before processing a single word of your prompt — 4.7 times more than OpenCode’s ~7,000-token baseline. The research used a logging proxy positioned between each agent and the API, with cryptographic audit-chain hashing to verify the captured payloads. The numbers are not estimates. On [Hacker News](https://news.ycombinator.com/item?id=48883275), the analysis gathered 533 upvotes on July 13, making it a top story for the day.\n\n## Claude Code Token Overhead: Where the 33,000 Tokens Come From\n\nTool schemas are the primary driver of Claude Code’s token overhead. According to the Systima analysis, roughly 24,000 of Claude Code’s ~33,000 bootstrap tokens are tool definitions — every action Claude Code could potentially take, sent upfront before it knows what you need. OpenCode ships ~4,800 tokens of tool schemas. The remaining gap comes from system prompt size and scaffolding injected around the prompt.\n\nHowever, the 4.7x figure applies specifically to Claude Sonnet 4.5. On Claude Fable 5, the gap narrows to 3.3x, because Anthropic sends newer models a significantly smaller system prompt. That reduction matters, and it suggests Anthropic is actively trimming overhead across model generations — but it does not eliminate the structural disparity between the two tools.\n\nRelated:[Claude Code Auto Mode Is Now Default on Bedrock, Vertex, and Foundry]\n\n## The Claude Code Cache Problem Is Worse Than the Baseline\n\nThe bootstrap gap is the headline finding, but the cache behavior is the more damaging issue for teams on enterprise API billing. OpenCode maintains a byte-identical request prefix across every turn in a session. As a result, it pays once to write the prefix to Anthropic’s prompt cache and reads cheaply on every subsequent turn. Claude Code, in contrast, rewrites its cache prefix mid-session, generating up to 54x more cache-write tokens than OpenCode on identical tasks.\n\nCache-write tokens carry a premium billing rate. Cache reads are heavily discounted. Furthermore, if Claude Code generates 54x more cache writes on the same work, the billing impact compounds with every turn of a long session. The meter does not just start higher — it runs faster through a session than the 4.7x baseline figure suggests.\n\n## Where Claude Code Token Costs Compound: MCP, CLAUDE.md, and Subagents\n\nThe 33,000-token baseline assumes a minimal configuration. Real-world deployments push it substantially higher. A 72KB CLAUDE.md instruction file adds approximately 20,000 tokens per request. Five connected MCP servers add 4,900–7,000 tokens per turn — each server injects its full tool schema whether or not it is used in that turn. Playwright MCP alone costs ~3,500 tokens per message.\n\nSubagent delegation is the hardest multiplier to control. Each spawned subagent carries its own full bootstrap overhead, and Systima’s data shows a 4.2x cost multiplier per delegated task. The Hacker News discussion included an engineering lead reporting “$400k in annual burn from system prompt wastage alone,” and a developer describing seven parallel subagents that exhausted a session budget before any of them finished. Moreover, these are not edge cases for teams using Claude Code’s agentic features at scale.\n\nRelated:[OpenCode Hits 7.5M Developers: How It Dethroned Cursor]\n\n## When Claude Code’s Overhead Pays for Itself\n\nThe overhead is an architectural trade-off, not a design flaw. Claude Code front-loads intelligence — shipping all tool definitions upfront — so it can batch multiple tool calls into a single round trip during execution. OpenCode, by contrast, takes one turn at a time and re-pays its 7,000-token baseline on every turn. For multi-step tasks where Claude Code’s batching activates, Systima found that Claude Code’s whole-session total can come out lower than OpenCode’s. A [Firecrawl benchmark](https://www.firecrawl.dev/blog/claude-code-vs-opencode) supports this: Claude Code completed four identical tasks in 9:09 versus OpenCode’s 16:20 using the same underlying model.\n\nThe problem is predictability. Even on a simple one-shot task where no batching advantage materializes, Claude Code still starts 26,000 tokens behind. That overhead is unavoidable regardless of task complexity. Teams doing quick lookups, short-form generation, or frequent single-turn interactions absorb the startup cost every time without the batching payoff.\n\n## What You Can Do About It\n\n**Trim your CLAUDE.md below 200 lines.** Every line loads before Claude reads your task. A 5,000-token CLAUDE.md is a 5,000-token tax on every turn of every session.**Disable MCP servers you are not actively using.** Run`/mcp`\n\nto see what is connected. Each idle server still injects its schema per turn.**Use** A 200-turn session re-reads the prior 49 messages every turn. Context overhead grows geometrically, not linearly.`/compact`\n\nbefore sessions grow long.**Audit before you optimize.** The`/context`\n\ncommand shows exactly what Claude is loading before each turn. Run it before changing your workflow.**Route simple tasks to smaller models.** Haiku receives a much smaller system prompt than Sonnet or Opus. Lookups and summaries do not need Opus.\n\nAdditionally, Claude Code’s [official cost documentation](https://code.claude.com/docs/en/costs) covers these mitigations in detail. Many teams report 40–85% reductions in token consumption through configuration changes alone — without switching tools. If you are on a subscription plan, the overhead is absorbed in the flat fee and this analysis primarily affects where your usage limits hit. On enterprise API billing, it is a direct line item worth measuring before making architecture decisions around subagents and MCP servers.", "url": "https://wpnews.pro/news/claude-code-token-overhead-4-7x-more-than-opencode", "canonical_source": "https://byteiota.com/claude-code-token-overhead-4-7x-more-than-opencode/", "published_at": "2026-07-13 06:12:54+00:00", "updated_at": "2026-07-13 11:15:54.253650+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "ai-products", "large-language-models", "developer-tools"], "entities": ["Claude Code", "OpenCode", "Anthropic", "Systima", "Claude Sonnet 4.5", "Claude Fable 5", "Playwright MCP", "Hacker News"], "alternates": {"html": "https://wpnews.pro/news/claude-code-token-overhead-4-7x-more-than-opencode", "markdown": "https://wpnews.pro/news/claude-code-token-overhead-4-7x-more-than-opencode.md", "text": "https://wpnews.pro/news/claude-code-token-overhead-4-7x-more-than-opencode.txt", "jsonld": "https://wpnews.pro/news/claude-code-token-overhead-4-7x-more-than-opencode.jsonld"}}