An abstract composition of translucent data streams flowing through two parallel narrow channels, one wide and one narrow, against a dark gradient background
News

Claude Code Sends 33,000 Tokens Before You Type a Word — OpenCode Sends 7,000

Claude Code burns 33K tokens of system overhead per request. OpenCode burns 7K. With production configs, both hit 75K+ — and subagents multiply the cost 4.2x.

Claude CodeOpenCodeToken overheadAI coding agentsAnthropic

Claude Code, Anthropic’s agentic coding tool, sends roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding before the user’s prompt even arrives. OpenCode, the open-source alternative, sends about 7,000. That 4.7x gap — measured at the API boundary by a logging proxy — means every Claude Code session starts a sixth of the way through a 200K context window before any code enters the conversation.

🔍 THE BOTTOM LINE

The harness you choose for agentic coding is a cost multiplier you probably haven’t measured. Systima.ai’s instrumentation shows Claude Code’s fixed overhead is nearly five times OpenCode’s, and production configurations with MCP servers and instruction files push both past 75,000 tokens per request. Subagents make it worse: a small task that cost 121,000 tokens done directly cost 513,000 when fanned out to two subagents — a 4.2x multiplier. For teams operating under the EU AI Act’s Article 12 logging requirements, “what does my agent actually send” is a question that now has data behind it.

What 33,000 Tokens Actually Buys

Systima.ai researchers spliced a logging proxy between each harness and the model endpoint, capturing the exact JSON payload emitted per request. The breakdown for a task as simple as “Reply with exactly: OK” — 22 characters — tells the story:

ComponentClaude CodeOpenCode
System prompt27,344 chars, 3 blocks9,324 chars, 1 block
Tool schemas27 tools, 99,778 chars10 tools, 20,856 chars
First-message scaffolding7,997 chars of <system-reminder> blocksnone
First-turn payload~32,800 tokens~6,900 tokens

Roughly 24,000 of Claude Code’s 33,000 tokens are tool definitions. The 27 tools include not just the coding core but an entire background-agent and orchestration suite — CronCreate, Monitor, the Task family, worktree management, push notifications. OpenCode ships ten classic coding tools and one system block that opens with “You are OpenCode, the best coding agent on the planet.”

Even with tools stripped entirely, Claude Code’s instruction set is over three times the size of OpenCode’s. The residual is behavioural doctrine: tone rules, safety guidance, task-management instructions, environment description.

Where the Gap Closes

On a multi-step write-run-test-fix loop, the gap inverted. Claude Code batched the entire job — two file writes and two script executions — into a single parallel tool round trip. OpenCode made exactly one tool call per turn and took nine. Because the baseline is re-sent on every request, request count multiplies baseline cost. OpenCode paid its ~7K baseline nine times; Claude Code paid its ~33K three times. The totals converged at ~121K vs ~132K tokens.

The meter starts higher with Claude Code, but how the session unfolds decides who spends more. A large-baseline harness that batches aggressively and a small-baseline harness that serialises can land in the same place.

The Real-World Multipliers

The floor — a fresh config with no MCP servers, no settings, no instruction files — is not where anyone operates. Each layer stacked on top adds tokens to every request:

  • Instruction files: A 72KB AGENTS.md from a production repo added 20,000 tokens per request to both harnesses. Claude Code 2.1.207 silently ignored AGENTS.md entirely and only ingested it when renamed CLAUDE.md.
  • MCP servers: Five modest public servers added 5,000 to 7,000 tokens, growing tool counts from 27 to 69 (Claude Code) and 10 to 52 (OpenCode).
  • Framework templates: An 8,405-char BMAD workflow template enters conversation history and gets re-carried by every subsequent request. A 9-request session re-sends it nine times.
  • Subagents: A modest fan-out to two subagents produced a 4.2x token multiplier — 513,000 tokens against 121,000 for the same work done directly.

The “everything” measurement — real working configurations with MCP servers, instruction files, and plugins — produced a first-request payload of roughly 75,000 tokens for Claude Code (118 tools) and 90,817 tokens for OpenCode (179 tools, 277KB of schemas). Both are cold-cache writes before the user has typed a word.

Cache Economics Don’t Save You

OpenCode’s request prefix was byte-identical in every run captured. It pays to cache its payload once per session and read it back for pennies. Claude Code re-wrote tens of thousands of prompt-cache tokens mid-session, run after run, and on the same task wrote up to 54x more cache tokens than OpenCode. Cache writes are billed at a premium.

A separate analysis of 119,866 API calls found Anthropic silently cut Claude Code’s prompt cache TTL from 1 hour to 5 minutes in early 2026, inflating costs 17-25% for users who never changed their workflow. The two findings reinforce each other: the harness is heavy, and the caching mechanism that should mitigate that heaviness is both less effective and more expensive than users assume.

A Newer Model Shrinks the Gap — But Not Enough

Re-running the floor test on Claude Fable 5 narrowed the gap to about 3.3x. The reason was unexpected: Claude Code’s system prompt is model-conditional. It sent 27,787 chars of instructions to Sonnet 4.5 but only 10,526 to Fable 5, with tool schemas also trimmed from 99,778 to 82,283 chars. Same 27 tools, much less doctrine. OpenCode’s payload was byte-identical across both models.

The gap is model-dependent and harness-dependent, but it does not close. Even on the newer model, Claude Code sends three times the overhead.

NZ Angle

For New Zealand development teams adopting agentic coding tools — increasingly common as AI coding agents reshape employment — the token overhead question is a direct cost line. At Anthropic’s API pricing, 33,000 tokens of overhead per request on a 200K context window means each session burns through context budget 16% faster before any work begins. For teams running multiple parallel agents, the subagent 4.2x multiplier means a two-agent fan-out costs as much as four direct executions. The choice between Claude Code and OpenCode is not just about capability — it is about how much of your token budget goes to the harness versus the actual work.

The Broader Pattern

This measurement arrives at a moment when the economics of AI coding agents are under scrutiny. Token costs for complex agentic tasks already rival junior developer salaries. The systima.ai data adds a structural dimension to that problem: even if model prices drop, harness overhead is a fixed tax on every request. DeepSeek’s push to build its own Claude Code rival is not just about model capability — it is about controlling the full stack, including the harness layer that determines how many tokens your infrastructure burns.

The open-source community has noticed. OpenCode’s leaner architecture — fewer tools, smaller system prompt, byte-identical cache prefixes — is not an accident. It is a design philosophy that treats token overhead as a first-class engineering problem. Anthropic’s Claude Code treats the harness as a platform, with the token cost that implies.

❓ FAQ

Does this mean Claude Code is worse than OpenCode? Not necessarily. On multi-step tasks, Claude Code’s aggressive batching brought total token consumption below OpenCode’s despite the higher per-request baseline. The right harness depends on your workload shape: short sessions favour OpenCode’s lean baseline; long complex sessions may favour Claude Code’s batching.

Can I reduce Claude Code’s token overhead? Partially. Stripping tools with --tools "" removes the tool schema weight (the largest component). Disabling unused MCP servers saves 1,000-1,400 tokens each. But the system prompt itself — 6,500 tokens even with no tools — cannot be reduced without modifying the harness.

Why does Claude Code send different system prompts to different models? The harness includes model-conditional logic that trims doctrine and tool schemas for newer models. The researchers found this unexpected: Fable 5 received less than half the system prompt Sonnet 4.5 received, with the same 27 tools but smaller schemas.

How does this compare to the cache TTL issue? The two problems compound. A 33K-token baseline that gets re-sent frequently is expensive. When the cache TTL drops from 1 hour to 5 minutes, that re-sending happens at uncached rates more often, multiplying the cost impact of the already-heavy baseline.

🔍 THE BOTTOM LINE

Every agentic coding session starts with a tax. Claude Code’s tax is 33,000 tokens. OpenCode’s is 7,000. Both scale to 75,000+ in production. The model gets cheaper every quarter; the harness overhead does not. Until someone measures it — as systima.ai just did — most teams are paying a tax they cannot see.

📰 Sources

Sources: Systima.ai, Hacker News, OpenAI