
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.
Direct answer
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.
Best for
Developers comparing real tool tradeoffs before choosing a stack.
Covers
Verdict, tradeoffs, pricing signals, workflow fit, and related alternatives.
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.
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.
Baseline token overhead:
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:
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.
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."
Newsletter
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools, delivered free every week.
From the archive
Jul 12, 2026 • 7 min read
Jul 12, 2026 • 7 min read
Jul 12, 2026 • 8 min read
Jul 12, 2026 • 6 min read
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.
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.
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.
If you're cost-sensitive or context-constrained, the research suggests several approaches:
Audit your configuration. Run /context in 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.
Read next
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 readThe Godot Foundation has established a policy banning autonomous AI agent code and substantial AI-generated contributions, citing reviewer burnout and concerns about maintainer mentorship.
6 min readA developer discovered that Claude Code's thinking output is summarized, not the raw reasoning. Here's what Anthropic's docs actually say - and why it matters.
5 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.
Anthropic's agentic coding CLI. Runs in your terminal, edits files autonomously, spawns sub-agents, and maintains memory...
View ToolInteractive TUI dashboard that shows exactly where your Claude Code and Cursor tokens are going, in real time.
View ToolOpen-source AI coding agent for terminal, desktop, and IDE. Works with 75+ LLM providers including Claude, GPT, Gemini,...
View ToolMac app for running parallel Claude Code, Codex, and Cursor agents in isolated workspaces. Watch every agent work at onc...
View ToolCatch broken SKILL.md files in CI before they hit your team.
View AppTurn a one-liner into a working Claude Code skill. From idea to installed in a minute.
View AppUnlock pro skills and share private collections with your team.
View AppPre-approve tools before a skill executes so it runs without prompts.
Claude CodeFires before Claude processes user input; can validate or block.
Claude CodeReal-time prompt loop with history, completions, and multiline input.
Claude Code
In this video, we dive into Anthropic's newly launched Cowork, a user-friendly extension of Claude Code designed to streamline work for both developers and non-developers. This discussion includes an

Try out GitKraken here: https://gitkraken.cello.so/myw3K67IkCr to get 50% GitKraken Pro. In this video, we explore GitKraken, a robust Git GUI that not only visualizes your Git repository...

Open Design: Open-Source n8n App That Turns Any Website into a Brand Kit, Design System, HTML + Images The video introduces Open Design, an MIT-licensed full-stack template that combines AI and n8n a

A controlled study of 660 Claude Code trials shows clean codebases reduce token usage by 7-8% and file revisitations by...

The Godot Foundation has established a policy banning autonomous AI agent code and substantial AI-generated contribution...

A new essay argues that letting AI generate sloppy code creates a downward spiral where future AI absorbs those bad patt...

Ginger Bill argues that the best tools disappear during use - and that celebrating workarounds is a sign your tool has f...

The HashiCorp co-founder explains why he chose Zig over Rust for Ghostty, the technical challenges of terminal emulator...

A Haskell Foundation board member explains why Scarf moved to Python after 7 years in production. The culprit: LLM-drive...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.