Skip to content
ATAI Today Brief
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS
NewsConceptsGuidesSubscribeAdvertiseAboutEditorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Agents & MCP/
  4. Analyzing Claude Code Token Overhead and Caching Costs Against OpenCode
Agents & MCP

Analyzing Claude Code Token Overhead and Caching Costs Against OpenCode

July 13, 2026· 8 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated July 13, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
Analyzing Claude Code Token Overhead and Caching Costs Against OpenCode

A systematic analysis of developer agents reveals that Claude Code injects around 33,000 tokens of system prompts, tool schemas, and reminders before reading your query, compared to OpenCode's minimal 7,000 tokens. This overhead escalates with system instructions, custom AGENTS.md files, and active Model Context Protocol servers, heavily impacting prompt-caching efficiency.

Impact: High

Why it matters

You can choose OpenCode or configure Claude Code carefully to avoid burning through thousands of cache-write tokens on short sessions.

TL;DR

  • 01Claude Code injects 33k baseline tokens (24k for 27 tool definitions) compared to OpenCode's 7k tokens (4.8k for 10 tools).
  • 02Dynamic reminders and updates cause Claude Code to generate up to 54x more cache-write tokens than OpenCode on identical tasks.
  • 03A typical dev setup with a 72KB AGENTS.md file and 5 MCP servers creates an immediate 75k-85k token overhead before any user input.

Key facts

Claude Code first-request baseline33,000 tokens
OpenCode first-request baseline7,000 tokens
AGENTS.md overhead (72KB file)~20,000 tokens
Claude Code first-request baseline
33,000 tokens
OpenCode first-request baseline
7,000 tokens
Tool definitions share in Claude Code
24,000 tokens (27 tools)
MCP server overhead (5 servers)
5,000 to 7,000 tokens
AGENTS.md overhead (72KB file)
~20,000 tokens

Measuring the Token Overhead

By splicing a logging proxy between each harness and the model endpoint, researchers captured the exact JSON payloads (system blocks, tool schemas, and messages) and the metered usage returned by the API. Claude Code 2.1.207 and OpenCode 1.17.18 were pinned to claude-sonnet-4-5. For a simple one-character query, Claude Code consumed 33,000 tokens of baseline scaffolding, whereas OpenCode used roughly 7,000. Removing all tools via configuration reveals that Claude Code's core behavioral instruction set (residual instructions, rules, and system text) is still over three times larger than OpenCode's (6.5k tokens vs 2k tokens).

The Caching Penalty

While prompt-cache reads are heavily discounted, cache writes are billed at a premium. OpenCode's request prefix remains identical run-to-run, allowing it to pay for the write once and enjoy cheap reads. Claude Code, however, dynamically updates its context and injects additional <system-reminder> blocks as the conversation progresses (starting with three on the first turn and reaching four by the first tool round trip). This triggers frequent, expensive cache writes mid-session, resulting in up to 54x more cache writes than OpenCode for identical tasks.

Developer Workstation Impact

In real-world setups, a 72KB local instruction file (such as AGENTS.md or CLAUDE.md) adds an average of 20,000 tokens to every single request. Running five modest MCP servers adds another 5,000 to 7,000 tokens. This means a developer's first request can be 75,000 to 85,000 tokens deep before they type a single word. When tasks are fanned out to subagents, costs compound rapidly: a task costing 121,000 tokens directly ballooned to 513,000 tokens when delegated to two subagents, as each subagent paid its own bootstrap cost and the parent consumed their transcripts.

Try it in 2 minutes

# To minimize tools overhead in Claude Code, disable unused tools or restrict with settings if available
# Run Claude Code without unnecessary tools configured:
claude --tools ""

bash

✓ When to use

  • When building complex, multi-step tasks where Claude Code's tool call batching outperforms OpenCode's serialized requests.
  • When working in a large repository with a lot of active tools and subagents where context accumulation is unavoidable.

✕ When NOT to use

  • When executing small, single-turn prompts where a 33k token overhead is highly cost-inefficient.
  • When budget constraints require highly strict prompt-caching behavior, which Claude Code degrades with dynamic system reminders.

What to do today

  • →Audit your project's custom CLAUDE.md or AGENTS.md files to keep their size minimal.
  • →Disable unused Model Context Protocol (MCP) servers to shave off up to 7,000 baseline tokens per request.
  • →Use OpenCode for simple, single-turn tasks to leverage its static, highly cache-efficient request prefix.

What the community says

  • “The Agents are more like Double Agents. Purporting to work for you, but with the primary goal of siphoning your wallet to its handler.”

    — AndrewOMartin on Hacker News

  • “When you care about optimising the entire experience, you offer sane defaults. When you prevent people from changing the defaults, it's about control, not experience.”

    — palata on Hacker News

#Claude Code#OpenCode#Model Context Protocol#claude-sonnet-4-5

Sources

  • Claude Code vs OpenCode: Token Overhead
ShareShare on XShare on LinkedIn
Next story →Quadrupling Performance in Dependency-Bound Loops with Branch Prediction

Related stories

  • Agents & MCPCoding Agent Showdown: Mistral Vibe for Code Leads on Cost and Openness
  • Agents & MCPExfiltrating Claude Memory via Link-Based Web Browsing Sandbox Escape
  • Agents & MCPTRACE System Automates Agent Training via Failure-Targeted Capability Adapters
  • Agents & MCPBuild Type-Safe Model Context Protocol Servers in Scala 3 with Chimp

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.