Anthropic’s Claude Code dispatches approximately 33,000 tokens to the API before a developer’s prompt is even read, while the open-source alternative OpenCode sends just 7,000. That 4.7x overhead gap, measured at the API boundary by Systima researchers in 2026, directly inflates latency, consumes context window space, and raises enterprise API costs for every single interaction.
TL;DR: Claude Code sends approximately 33,000 tokens to the API before processing a developer’s prompt, while OpenCode sends only 7,000 — a 4.7x overhead difference measured at the API boundary (Systima, 2026). This gap directly impacts latency, context window usage, and enterprise API costs.
How Much Token Overhead Does Claude Code Generate Versus OpenCode?
Claude Code generates 33,000 tokens of overhead per request before the user’s prompt is processed, compared to OpenCode’s 7,000 tokens, according to API boundary measurements published by Systima in 2026. This 4.7x difference means Claude Code consumes roughly 26,000 additional tokens on system prompts, tool definitions, and configuration schemas for every conversation turn.
The overhead is not marginal. For a developer issuing 100 prompts per day, Claude Code’s pre-prompt token consumption reaches 3.3 million tokens daily, versus 700,000 for OpenCode. At Claude’s API pricing, this translates to measurable cost differences over a billing cycle. The extra tokens also occupy context window space, reducing the effective room available for actual code and file contents.
Systima’s analysis measured raw HTTP requests at the API boundary, capturing everything Claude Code and OpenCode transmit before the model begins reasoning about the user’s input. The methodology isolated system prompts, tool definitions, MCP schemas, and instruction file contents from the user’s actual query. OpenCode’s leaner architecture simply sends less.
Why Does Claude Code Send 4.7x More Tokens Than OpenCode?
Claude Code sends 4.7x more tokens than OpenCode because it bundles a larger system prompt, more verbose tool definitions, mandatory instruction files, and extensive MCP (Model Context Protocol) schemas into every API request. OpenCode’s architecture takes a more modular approach, loading tools and schemas lazily rather than batching them upfront.
The system prompt alone in Claude Code includes extensive safety guidelines, behavioral instructions, and operational rules. Anthropic’s focus on safety and responsible AI development, as noted in coverage by Business Insider Polska, means the prompt template carries significant instructional weight. Each tool definition — for file reading, editing, bash execution, and search — includes detailed parameter descriptions and usage examples.
OpenCode, by contrast, was built with token efficiency as a design priority. The project’s GitHub repository shows 161K stars compared to Claude Code’s 132K, reflecting strong community adoption. Its tool definitions use shorter JSON schemas, and its system prompt is more concise. The result is a leaner initial request.
Subagent multipliers compound the problem. When Claude Code spawns subagents for complex tasks, each subagent inherits a copy of the system prompt and relevant tool definitions. Systima’s measurements show that a single subagent invocation can add another 15,000 to 20,000 tokens to total consumption. OpenCode’s subagent architecture shares context more efficiently.
Cache-write behavior partially mitigates the cost. Anthropic’s API supports prompt caching, which reduces the per-token price for repeated system prompts. However, the initial cache write still consumes tokens, and any modification to instruction files invalidates the cache entirely. This forces a full re-transmission on the next request.
How Do Instruction Files Contribute to Claude Code’s Token Bloat?
Instruction files contribute to Claude Code’s token bloat by being loaded into the system prompt as plain text on every API call, adding anywhere from 2,000 to 8,000 tokens depending on configuration. Claude Code reads CLAUDE.md files from the project root and any parent directories, concatenating their contents into the system prompt before the user’s query is processed.
A typical CLAUDE.md file contains project-specific rules, coding standards, file structure descriptions, and behavioral guidelines. Developers often write these files to be thorough, not concise. A detailed instruction file covering architecture decisions, testing conventions, and deployment procedures can easily exceed 5,000 tokens. Claude Code loads all of it unconditionally.
The Systima analysis found that instruction file weight varies significantly across projects. Some teams maintain minimal CLAUDE.md files under 500 tokens. Others treat the file as comprehensive documentation, pushing past 10,000 tokens. Every token in that file is transmitted with each API request, regardless of whether the current query relates to those instructions.
OpenCode handles instruction files differently. According to the MorphLLM comparison, OpenCode supports a more granular instruction system where context is loaded based on the active task. Files are parsed and filtered rather than blindly concatenated. This lazy-loading approach keeps the base prompt small while still providing relevant instructions when needed.
Cache invalidation is the hidden cost. When a developer edits CLAUDE.md mid-session — a common workflow when refining agent behavior — the entire cached system prompt is discarded. The next API call re-transmits the full 33,000-token payload. For teams iterating on instruction files, this creates a pattern of repeated full-cost requests.
What Is the MCP Schema Tax in AI Coding Agents?
The MCP schema tax is the token cost incurred when AI coding agents include Model Context Protocol connector definitions in every API request, adding 3,000 to 12,000 tokens per connected server. Claude Code supports MCP integrations natively, and each connected MCP server contributes its full tool schema to the system prompt.
MCP servers expose tools for database queries, API calls, file system access, and external service integration. Each tool definition includes a name, description, input schema, and usage notes. A single MCP server exposing five tools can add 2,000 to 4,000 tokens. Teams connecting three or four MCP servers see their overhead climb rapidly.
Systima’s measurements isolated MCP schemas as a significant contributor to Claude Code’s 33,000-token baseline. The analysis showed that a default Claude Code installation with two MCP servers connected added approximately 6,500 tokens of schema definitions alone. OpenCode’s MCP implementation uses compressed schema representations and loads them on demand.
The security implications extend beyond cost. TechRepublic’s coverage of Claude Code governance risks highlights that MCP connectors also expand the attack surface. Each connected server represents a potential data exfiltration path, as demonstrated when Anthropic’s own surveillance code incident revealed how agents can transmit sensitive information to remote servers without user awareness.
Anthropic’s hidden tracker incident, covered by Malwarebytes and CyberNews, further underscores the risk. The tracker was embedded in Claude Code’s operational payload — the same payload that carries those 33,000 tokens. Developers who never inspected the full API request had no visibility into what was being transmitted alongside their prompts and code.
How Do Subagents Multiply Token Consumption in Claude Code?
Claude Code’s subagent architecture multiplies the already substantial 33k token baseline by spawning independent agent instances that each receive their own copy of system instructions. According to Systima’s API-boundary measurements, Claude Code applies a “subagent multiplier” that effectively duplicates or triplicates the core instruction set for every parallel task dispatched (Systima Blog, 2026). This means a single user request triggering two subagents can push the pre-prompt token count toward 66k or higher.
Each subagent operates with its own context window. The parent agent must communicate task parameters, file contents, and constraints to every child agent it spawns. OpenCode handles this differently. Its architecture avoids full instruction duplication per subagent, which keeps the baseline closer to the 7k token mark even when parallel work is involved.
The multiplier effect becomes severe in complex workflows. A refactoring task across multiple files might trigger several subagents for analysis, testing, and implementation. Each one carries the full system prompt weight. This is not a minor overhead. At scale, subagent token multiplication can dominate the total cost of an API session, especially when tasks are short but numerous.
Does Cache Behavior Offset the High Token Overhead?
Claude Code relies on prompt caching to reduce the cost impact of its 33k token baseline, but cache behavior introduces its own complications. The Anthropic API applies cache-read pricing at roughly 10% of standard input token costs, meaning repeated requests within a cache window are significantly cheaper than the first request. However, the initial cache-write operation charges a premium of approximately 25% above standard input token rates (Systima Blog, 2026).
This creates a pricing asymmetry. The first request in a session pays more than the raw token count suggests, while subsequent requests pay less. For short sessions with only a handful of interactions, the cache-write surcharge means the effective cost per token exceeds the listed API price. The overhead only amortizes over longer sessions with many repeated requests hitting the same cached prefix.
OpenCode’s 7k token baseline reduces the urgency of cache optimization. With a smaller instruction set, the cache-write penalty is proportionally smaller, and cache misses cost less. Developers running brief, intermittent API calls will notice the difference immediately. The cache does help Claude Code, but it does not erase the fundamental 4.7x disparity in baseline token weight between the two tools.
How Can Developers Reduce Claude Code’s Token Overhead?
Reducing Claude Code’s token overhead requires deliberate configuration changes that trim the default instruction set and disable features that inflate the system prompt. The most impactful adjustments target MCP servers, subagent policies, and custom instruction files that Claude Code loads on every request.
Developers can take several concrete steps to cut token usage:
- Disable unused MCP servers. Every connected MCP server contributes schema definitions to the system prompt. Removing servers you do not actively use eliminates that schema tax immediately.
- Limit subagent concurrency. Fewer parallel subagents means fewer copies of the core instruction set sent to the API.
- Trim custom instruction files. Large
.claudeconfiguration files or project-level instructions add weight to every request. Keep them concise. - Use session-level effort settings carefully. Commands like
ultracodeset session effort toxhigh, which can increase token output. Use them only when needed (techwebsite.pl, 2026). - Audit tool definitions. Each tool registered in the system prompt adds tokens. Remove tools that are not relevant to the current workflow.
- Monitor API usage dashboards. Track actual token consumption per request to identify which features cost the most.
- Switch models for simpler tasks. Using a smaller model for routine operations reduces both token cost and latency.
- Consider OpenCode for high-volume workflows. Its 7k token baseline offers a lower cost ceiling for token-intensive operations.
| Optimization Step | Estimated Token Reduction | Effort Level |
|---|---|---|
| Disable unused MCP servers | 2,000–8,000 tokens | Low |
| Trim instruction files | 1,000–5,000 tokens | Low |
| Limit subagent concurrency | 10,000–20,000 tokens | Medium |
| Remove unused tool definitions | 500–2,000 tokens | Low |
| Switch to OpenCode | 26,000 tokens baseline | High |
None of these steps are automatic. Claude Code ships with defaults optimized for capability rather than frugality, so developers must actively manage their configuration to approach OpenCode’s leaner footprint.
How Does OpenCode Keep Its Baseline Token Footprint So Low?
OpenCode achieves its 7k token baseline through a fundamentally different architectural philosophy that prioritizes minimal system prompts and lazy-loading of tool definitions. Instead of bundling every instruction, schema, and tool description into a single monolithic prompt sent on every API call, OpenCode loads context incrementally based on what the current task actually requires (Systima Blog, 2026).
The system prompt contains only essential operational instructions. MCP server schemas load on demand rather than upfront. Subagent definitions do not duplicate the full parent instruction set. This approach means the API receives a leaner payload, and the model processes less boilerplate before reaching the user’s actual request.
OpenCode also benefits from its open-source development model. With 161k GitHub stars compared to Claude Code’s 132k, the community actively scrutinizes and optimizes prompt architecture (MorphLLM, 2026). Contributors can inspect the exact contents of every system prompt, identify unnecessary verbosity, and submit improvements. Claude Code’s closed prompt structure prevents this kind of community-driven optimization.
The result is a tool that reaches the user’s prompt faster. Less boilerplate means lower latency on the first token. Lower token counts mean smaller bills. For developers who measure cost per interaction, OpenCode’s architecture provides a structural advantage that configuration tweaks on Claude Code cannot fully replicate.
What Does the Token Disparity Mean for Enterprise API Costs?
The 4.7x token overhead disparity between Claude Code and OpenCode translates directly into measurable cost differences for enterprise deployments running thousands of API calls daily. At Anthropic’s published API pricing for Claude models, an extra 26,000 tokens per request compounds rapidly across a development team. A team of 50 developers making 20 API calls each per day generates over 1,000 daily requests, and the extra tokens add thousands of dollars in monthly API costs (Systima Blog, 2026).
Enterprise cost projections must account for both cache behavior and subagent multiplication. Cache-read discounts help recurring requests, but new sessions, cache expirations, and subagent spawns all incur full-price token charges. Organizations with bursty usage patterns or many short sessions will feel the overhead more acutely than those with long, continuous sessions.
The surveillance controversy adds another enterprise concern. Anthropic embedded tracking code in Claude Code that monitored proxy and timezone data for Chinese users, which China flagged as a potential backdoor vulnerability (CNBC, 2026; Cybernews, 2026). Enterprises evaluating AI coding tools must weigh not only token costs but also governance and data exposure risks. TechRepublic notes that the incident underscores the need for stronger AI agent governance frameworks, particularly around MCP connectors and enterprise data access (TechRepublic, 2026).
OpenCode’s open-source model allows enterprises to audit every line of code sent to the API. No hidden trackers. No obfuscated telemetry. For organizations with strict compliance requirements, that transparency carries value beyond raw token savings.
Frequently Asked Questions
Does Claude Code’s 33k token overhead apply to every single API request?
Yes, the 33k token baseline applies to every API request that Claude Code sends before the user’s prompt is included. According to Systima’s measurements, this baseline consists of system instructions, tool definitions, and MCP schemas that ship with every out-of-the-box request (Systima Blog, 2026). Prompt caching can reduce the cost of repeated requests, but the token count itself remains consistent across calls.
Can disabling MCP servers reduce Claude Code’s token overhead?
Disabling unused MCP servers is one of the most effective ways to reduce Claude Code’s token overhead. Each connected MCP server contributes schema definitions and tool descriptions to the system prompt, and Systima’s analysis identifies this as a significant component of the total baseline (Systima Blog, 2026). Developers should audit their MCP connections regularly and remove any servers that are not actively needed for the current workflow.
Does OpenCode support the same subagent workflows as Claude Code?
OpenCode supports subagent workflows but implements them without the full instruction duplication that inflates Claude Code’s token count. MorphLLM’s July 2026 comparison notes that OpenCode features a Scout subagent and /goal autonomy mode, with 326k daily commits across its ecosystem (MorphLLM, 2026). The subagent architecture avoids the multiplier effect that causes Claude Code’s token count to balloon during parallel task execution.
Will switching to OpenCode break existing Claude Code configurations?
Switching to OpenCode requires reconfiguration because the two tools use different configuration formats and instruction file structures. OpenCode operates as an open-source alternative with its own settings system, and Claude Code’s .claude files and MCP server configurations will not transfer directly. Developers should expect to rebuild their tool definitions and instruction files, though the 26k token savings per request provide a strong incentive to make the transition.
Summary
The token overhead disparity between Claude Code and OpenCode reveals critical differences in how these AI coding tools architect their API interactions. Here are the key takeaways:
- Claude Code sends 33k tokens before reading the user’s prompt, while OpenCode sends approximately 7k — a 4.7x difference measured at the API boundary (Systima Blog, 2026).
- Subagent architecture multiplies the problem. Claude Code duplicates core instructions for every spawned subagent, while OpenCode avoids full instruction duplication.
- Prompt caching partially offsets costs but does not eliminate the disparity. Cache-write surcharges of ~25% and cache-read discounts of ~90% mean the overhead only amortizes over long sessions.
- Developers can reduce overhead by disabling unused MCP servers, trimming instruction files, and limiting subagent concurrency. These steps require active management of Claude Code’s defaults.
- OpenCode’s open-source architecture enables community-driven prompt optimization and full transparency. No hidden trackers, no obfuscated telemetry — a critical advantage after Anthropic’s surveillance controversy (Cybernews, 2026; Malwarebytes, 2026).
For enterprise teams evaluating AI coding tools, token overhead is not a minor detail. It drives API costs, affects latency, and reflects the architectural priorities of the tool you choose. Read the full technical breakdown at Systima’s blog and explore OpenCode’s features to decide which tool fits your workflow.