Claude Code Sends 33k Tokens Before Your Prompt - OpenCode Sends 7k

TL;DR
New research shows Claude Code's system prompt and tool scaffolding consume 4.7x more tokens than OpenCode before processing user input. The HN thread debates whether that overhead buys better outcomes.
A benchmarking study from Systima.ai landed on Hacker News today with 330 points and 185 comments. The finding: Claude Code sends approximately 33,000 tokens to Claude Sonnet 4.5 before processing a single character of user input. OpenCode sends roughly 7,000 - a 4.7x difference.
The research sparked a heated discussion about whether Anthropic's coding harness is inefficiently designed or whether the extra context delivers proportionally better results.
The Methodology#
Systima added a logging proxy between their agentic coding tools and Anthropic's API endpoint. They captured all JSON payloads and the returned usage blocks, running tests across three task variants: simple replies, file summarization, and multi-step coding tasks.
Both harnesses were pinned to claude-sonnet-4-5, running through a local gateway called Meridian that bridges Claude Code to standard Anthropic endpoints. The researchers subtracted a 6,200-token constant introduced by their gateway infrastructure.
The Numbers#
Baseline token overhead:
- Claude Code: ~33,000 tokens (system prompt, 27 tools, scaffolding)
- OpenCode: ~7,000 tokens (system prompt, 10 tools, minimal scaffolding)
The gap narrows on Claude Fable 5, dropping to 3.3x instead of 4.7x, but Claude Code still consumes substantially more tokens before user input.
Production multipliers make it worse. In real-world configurations with instruction files and MCP servers, the numbers escalate:
- 72KB instruction files add ~20,000 tokens per request
- Five MCP servers add 5,000-7,000 additional tokens
- Subagent delegation multiplies costs 4.2x (121,000 to 513,000 tokens in their tests)
A production Claude Code setup can reach 75,000-85,000 tokens before any user input. On a 200k-token context window, that's 40%+ consumed by bootstrap alone.
Cache Economics#
The more interesting finding involves caching behavior. OpenCode maintains byte-identical request prefixes across sessions, enabling efficient API caching. Claude Code rewrites cache contents mid-session.
On identical tasks, Claude Code generated up to 54x more cache-write tokens than OpenCode. Since cache writes are billed at a premium, this explains why the researchers noticed their usage dashboard "climbing" significantly faster with Claude Code.
The study notes: "Byte-unstable prefixes (Claude Code) versus stable ones (OpenCode) create measurable cache-economics divergence when sessions resume after TTL expiration."
The Counterintuitive Finding#
Here's where it gets interesting. On multi-step tasks, Claude Code's whole-task cost approached OpenCode's. The reason: Claude Code's aggressive batching of parallel tool calls results in fewer total API requests, which can offset its higher per-request baseline.
Task structure determines final expenditure. Simple prompts like "Hey" or "commit" can trigger 30+ tool calls in Claude Code. But complex multi-file refactoring might end up costing similarly across both harnesses because Claude Code makes fewer round trips.
What HN Is Saying#
The Hacker News thread generated several distinct response patterns.
Skeptics questioned the methodology. One commenter asked why the researchers used an older model (Sonnet 4.5) and speculated the article might be AI-generated with AI-driven testing. The Systima team responded that they ran through a Claude Max subscription for cost reasons, and pinning to a stable snapshot kept comparisons clean. They offered to rerun on Fable 5 and publish the diff.
Tokenflation concerns emerged as a pattern. Multiple commenters described noticing the same trend across different harnesses. One cited their own testing showing prompts like "Hey" or "commit" triggering 30+ tool calls. Another wrote: "Agents are becoming more aggressive about using tools, even for trivial requests. Tokenflation seems very real."
Pi advocates entered the chat. Several commenters pointed to the Pi agent framework, which sends roughly 1k tokens with its minimal system prompt. One commenter noted their $20/month subscription using GPT 5.6 with thinking disabled "lasts for hours" on Pi. Another estimated their OpenCode system prompt at around 4k tokens with some extras enabled, compared to the 162k JSON payload they captured from Claude Code via mitmproxy.
Build-your-own arguments surfaced. One highly upvoted comment suggested skipping existing harnesses entirely: "If you really want a minimal agent that you heavily customize, just write your own. You learn a bunch, and it's not hard." Others countered that Pi and similar minimal frameworks don't ship with essential tools - you have to add everything yourself.
The incentive alignment question. A commenter noted that Anthropic "wants to produce the best coding agent possible and doesn't care (is even incentivized) about high costs." Others pointed out there's no evidence Claude Code is actually a better agent despite the higher token consumption.
Cache-busting configurations. Technical discussion focused on practices that invalidate caching. One commenter noted that setting the date and current directory on every system prompt call would bust the cache, though day changes and directory changes are infrequent enough to minimize this. Another described using the --dangerously-skip-permissions flag with --lite to reduce token overhead.
The Broader Picture#
This research lands at an interesting moment. The AI coding tool market has bifurcated into two philosophies: comprehensive platforms like Claude Code that bundle orchestration, task management, and extensive tool libraries, versus minimal harnesses like Pi and Hermes that prioritize token efficiency and user customization.
The efficiency argument is straightforward: if 40% of your context window is consumed before you start working, you have less room for actual code context. On a complex refactoring task in a large codebase, that matters.
The capability argument is less clear. Does Claude Code's extra scaffolding - the 27 tools, the background-agent orchestration, the task management systems - produce measurably better outcomes? The Systima research doesn't answer this question directly, and the HN thread split on whether token consumption correlates with output quality.
One practical note from the thread: users running local models through Claude Code found it "very slow" due to the large initial system prompt. The 162k JSON payload makes local inference significantly less practical than with minimal harnesses.
Practical Implications#
If you're cost-sensitive or context-constrained, the research suggests several approaches:
-
Audit your configuration. Run
/contextin Claude Code to see actual token breakdown. Users in the thread reported seeing 23k tokens on fresh sessions, but that can balloon with MCP servers and instruction files. -
Consider minimal alternatives. Pi, OpenCode, and Hermes ship with smaller system prompts. The tradeoff is fewer built-in capabilities.
-
Mind your cache. Byte-stable request prefixes (OpenCode's approach) enable API caching. Configuration changes that modify the prefix invalidate cached context.
-
Task structure matters. Simple prompts may cost more in Claude Code due to aggressive tool calling. Complex multi-step tasks may converge in cost due to Claude Code's parallel batching.
The debate ultimately reflects a broader tension in tooling philosophy. Comprehensive defaults versus minimal starting points. Neither is objectively correct - it depends on whether you value convenience or control, and whether token costs matter for your use case.
Continue Reading#
- Agent-Manager: A Tmux TUI for Running Claude Code, Codex, and OpenCode Side by Side
- AI Test Generation Tools Compared 2026: Which One Actually Catches Bugs
- Building and Shipping iOS and Mac Apps Without Opening Xcode
- Prime Agent: A Self-Improving Coding Harness Where Everything Is Python
Sources#
- Systima.ai Research - Original benchmarking study
- Hacker News Discussion - 185 comments as of publication
- Pi Agent System Prompt - Referenced minimal harness
- Quesma Token Cost Analysis - Related research on tool-call overhead
Get the next comparison like this in your inbox
One email a week on News and the rest of the AI dev stack. Free.
Read next on Claude Code
Agent-Manager: A Tmux TUI for Running Claude Code, Codex, and OpenCode Side by Side
Agent-Manager wraps tmux into a Go TUI that groups AI coding agents by project, shows live status for each, and lets you answer blocked agents or review their changes without attaching to their terminal.
7 min readClean Code Makes AI Agents 34% More Efficient - New Research
A controlled study of 660 Claude Code trials shows clean codebases reduce token usage by 7-8% and file revisitations by 34%, while pass rates stay the same. Traditional maintainability principles still matter in the age of AI coding.
7 min readSlack Code vs Claude Code vs Cursor vs OpenCode: When Agents Belong in Chat
Slack Code puts coding agents in dedicated Slack channels with diffs, live HTML previews, and an audit log. Here is when that beats a local Claude Code session, Cursor, or OpenCode - and when to skip it.
7 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








