Claude Code vs OpenCode Token Overhead — What Systima Measured at the API Boundary
Systima logged every request: Claude Code sends ~33k tokens before your prompt; OpenCode ~7k. Subagents, MCP, cache re-writes, and instruction files multiply the bill. explainx.ai on what enterprises should log and control.
The model is half the bill. The harness is the other half — and most teams never measure it.
On July 12, 2026, Systima published a controlled comparison: same machine, same pinned model (claude-sonnet-4-5), logging proxy at the API boundary, 185 tamper-evident request/response records. Hacker News sent it to 456 points — not because anyone doubted models cost money, but because the meter climbs faster under Claude Code than OpenCode for identical "Reply: OK" tasks.
This is the explainx.ai read on what was measured, what HN argued about, and what enterprises should log after Nadella's trust-boundary framing.
The proxy captures ground truth: exact JSON bodies (system blocks, tool schemas, messages) plus API usage (input, cache write, cache read, output).
That mirrors what we tell enterprise clients: treat inference logs like an audit trail, not a dashboard vanity metric. Systima chained records with @systima/aiact-audit-log — same integrity pattern as regulated AI logging. A token benchmark is a toy; a credit-decisioning agent is not.
If your traffic passes through a gateway (Systima used Meridian), measure the envelope with a bare request first. Otherwise you are grading your proxy, not the harness.
Part I — The floor (22-character prompt)
Task T1: "Reply with exactly: OK" — three runs per harness, fresh config, no MCP, no memory, empty workspace.
Component
Claude Code
OpenCode
System prompt
27,344 chars (3 blocks)
9,324 chars (1 block)
Tool schemas
27 tools, 99,778 chars
10 tools, 20,856 chars
First-message scaffolding
7,997 chars <system-reminder>
none
Calibrated first-turn payload
~32,800 tokens
~6,900 tokens
Zero-tools variant: Claude Code system prompt alone ~6.5k tokens; OpenCode ~2.0k — still more than 3× residual doctrine (tone, safety, task management).
explainx.ai note: Tool schemas dominate both harnesses. Progressive tool disclosure — project-scoped MCP, not global kitchen-sink — is the first cost lever most teams skip.
Where the gap closes — T3 inversion
Multi-step FizzBuzz write-run-test-fix inverted the narrative:
HN takeaway (PUSH_AX):"Contractor A quoted $33k, Contractor B $7k — are we measuring the right thing?" Systima acknowledged this and promised deeper tasks + qualitative comparison. Fair. Tokens are necessary, not sufficient. But on T1–T2, both harnesses completed correctly — the gap was cost for identical outcome, which is measurable.
Part II — Multipliers (real sessions)
1. Instruction file (+20k each)
72KB production AGENTS.md / CLAUDE.md → ~20,000 tokens per request on both harnesses.
Footgun: Claude Code 2.1.207 ignored AGENTS.md until renamed CLAUDE.md. OpenCode reads either. Silent ignore = zero value, full tax if you duplicate both.
2. MCP servers (~1–1.4k per server)
Five public servers: +4,900 tokens (CC payload) / +6,967 metered (OpenCode). Production APIs ship much larger schemas.
Footgun: project .mcp.json ignored in print mode until --mcp-config passed.
Same T3 direct: 121k → two parallel subagents: 513k (4.2×).
Each subagent pays its own bootstrap (~3,554-char agent prompt + 24/27 tools); parent ingests transcripts. HN reports of 7, 41, even 415 Fable subagents on one prompt are not outliers — they're the same mechanism runaway.
Mitigations from practitioners:
markdown
CRITICAL: Do NOT spawn sub-agents unless I explicitly request.
Use Explore (Haiku) subagents, not parent-model inheritance.
Or --disallowedTools Task / concurrency caps.
5. Extended thinking
Systima declined to publish numbers — gateway overrode harness toggles. Mechanism still compounds: reasoning blocks join history and re-send.
The "everything" cold start
Config
First-request metered input
OpenCode: 11 MCP + 72KB instructions
90,817 tokens (179 tools, 277KB schemas)
Claude Code: 4 MCP + plugins + instructions
~75,000 tokens (118 tools, 311KB payload)
~12× OpenCode's lean floor — your config sets the bill, not the harness alone.
Cache economics — stability beats size
Both set cache breakpoints. Discount does not erase:
Write premium — TTL expiry (5 min meeting, lunch) re-primes full stack at 1.25×–2×
Read × request count — subagents and serial loops multiply
Context window — 85k bootstrap = 40%+ of 200k before code; compaction spends more tokens
Decisive difference: prefix stability.
OpenCode
Claude Code
Prefix across runs
Byte-identical
Varies by session
Mid-session re-write (T2)
0
43k–54k tokens
Cache-write vs OpenCode
1×
5.9×–54×
Re-writing a byte-identical prefix buys zero quality — pure waste. Prompt caching guide covers breakpoint design; Systima proves harness implementation matters as much as provider pricing.
Fable 5 floor — model-conditional bloat
Re-run on Fable 5: Claude Code system prompt 27,787 → 10,526 chars; tool schemas trimmed. OpenCode unchanged. Gap 4.7× → 3.3×.
Implication for July's limit-reset churn: upgrading models changes harness payload, not just capability.
HN debate — malice vs incompetence vs architecture
Three camps surfaced:
Camp
Argument
Conflict of interest
Model vendor ships harness → token merchant incentives
Architecture
CC is orchestration platform (Cron, Task, skills, subagents); OpenCode is lean REPL
Measurement
Cache hits cheapen floor; quality on hard tasks untested
explainx.ai synthesis:
Vendor harness ≠ neutral infrastructure — aligns with Nadella's Control pillar: own traces, private evals, model-agnostic runners
Subscription vs API changes incentives — flat-fee users hit rate limits; enterprise API users hit $/token × unstable cache
Goodhart arrives fast — optimizing "tokens" without $/merged PR or human edit ratio is spec gaming
Pi (~1k), maki.sh, custom 200-line proxies — competition is fierce; gains get copied
Practical floor from HN: --system-prompt "" on Claude Code CLI; verify in /context. Strips doctrine, not tools.
What enterprises should do Monday
Action
Why
Deploy API-boundary logging
Payload + usage per request; SHA-chained if regulated
Figures from Systima's July 12, 2026 study (Claude Code 2.1.207, OpenCode 1.17.18, Sonnet 4.5 + Fable 5 floor re-run). Harness versions change frequently — treat numbers as a snapshot; treat the measurement method as durable.