How to Reduce Claude Code's Token Overhead (the 33k Before Your Prompt) — What's Real and What Caching Fixes

Read time: ~7 minutes. Key facts:

  • A logging-proxy analysis measured ~33,000 tokens of Claude Code overhead (system prompt + tool schemas + scaffolding) before your prompt is processed, vs ~7,000 for OpenCode, on Sonnet 4.5.
  • ~24,000 of that ~33,000 is tool definitions — Claude Code ships 27 tools (including an orchestration suite) vs OpenCode’s 10.
  • That overhead is a stable prefix, and Claude Code automatically prompt-caches it (requesting the 1-hour TTL on a subscription), so the repeat cost is a fraction of the sticker number.
  • The levers that actually move the needle: trim CLAUDE.md, prune MCP servers, watch subagent fan-out (measured as a 4.2× multiplier), use /compact, and inspect it all with /context.

Sourcing note: the 33k/7k measurements and breakdown are from a single third-party analysis by Systima (logging proxy, Claude Code 2.1.207) — reported as their measurement, not a universal constant. The reduction levers and caching behavior are from the official Claude Code prompt-caching docs and Claude Code’s /context command. Measure your own setup before optimizing — your numbers depend on your MCP servers and instruction files. Links at the bottom.

A benchmark made the rounds recently: Claude Code sends ~33,000 tokens before it even reads your prompt; OpenCode sends ~7,000. It’s a real, measured number — and it’s easy to read it as “Claude Code wastes 5× the tokens.” The fuller story is more useful: most of that overhead is a stable prefix that gets cached, so you don’t pay it in full every turn, and the parts you do control are a short, specific list. Here’s what’s real, what caching handles, and what you should actually change.


1. What the 33k is made of

The measurement (from Systima’s logging-proxy analysis, Claude Code 2.1.207 on Sonnet 4.5) breaks down like this:

ComponentSizeTokens
Tool schemas (27 tools)99,778 chars~24,000
System prompt27,344 chars~6,500
First-message scaffolding7,997 chars(system-reminder blocks)
Total~32,800

OpenCode, by comparison: a ~9,300-char system prompt, 10 tools (~20,900 chars of schema), zero scaffolding — ~6,900 tokens.

The headline: tool definitions dominate. Roughly 24k of Claude Code’s 33k is the schema for its 27 tools — which include an orchestration suite (the Task subagent family, CronCreate, Monitor, worktree management, push notifications) that OpenCode’s 10 “classical coding” tools simply don’t have. That’s the trade: Claude Code’s overhead buys capability (background agents, scheduling, worktrees). If you never use those, you’re paying schema for tools you don’t call.


2. The part everyone misses: it’s a cached prefix

Here’s the nuance the raw number hides. That ~33k is a stable prefix — the same system prompt and tool schemas at the front of every request. And Claude Code automatically uses prompt caching for it.

From the official docs: Claude Code caches the prompt prefix, and on a Claude subscription it requests the 1-hour cache TTL automatically — the longer TTL costs you nothing extra and just keeps your cache warm. A cache read is a fraction of the price of processing those tokens fresh (and doesn’t re-consume your context budget the way you’d fear from the sticker number).

So the honest framing: you pay the full ~33k once to warm the cache, then cache reads for subsequent turns as long as the prefix stays stable. The failure mode isn’t the 33k itself — it’s doing things that invalidate the cache (changing the stable prefix mid-session), which forces re-processing. Which leads directly to the levers below.


3. See your own overhead: /context

Before optimizing, measure. Claude Code’s /context command shows exactly where your tokens go — system prompt, tools, memory files (CLAUDE.md), skills, and conversation history — as a live breakdown. Run it in a session and you’ll see your real numbers, which depend heavily on your MCP servers and instruction files, not the benchmark’s clean-room setup.

(For the API-boundary truth Systima used, you can also splice a logging proxy between the client and the endpoint — but /context is the two-second version for day-to-day work.)


4. The levers that actually reduce it

Trim CLAUDE.md

Your CLAUDE.md loads before Claude reads your code or your task — every turn, every session. It’s a constant baseline: a 5,000-token CLAUDE.md costs 5,000 tokens before you type a word. Systima measured a 72KB production instruction file adding ~20,000 tokens per request. This is often the single biggest thing you control. Keep it tight: project-specific rules, not an essay. Move rarely-needed detail into files Claude can read on demand instead of a giant always-on memory file.

Prune MCP servers

Every connected MCP server loads its full tool definitions into context at the start of every session — whether you use it or not. Systima measured five servers adding ~4,900–6,967 tokens per request. Disconnect servers you’re not actively using. If you rely on MCP results, prefer a context-mode setup that indexes large MCP JSON and hands Claude a searchable summary instead of dumping raw output into context — reported to cut MCP-related tokens 50–90% in tool-heavy sessions.

Watch subagent fan-out

The biggest multiplier isn’t the prefix — it’s fan-out. Systima measured that fanning one task to two subagents grew a 121,000-token task to 513,000 tokens — a 4.2× multiplier. Subagents each carry their own context (including their own overhead). They’re powerful, but don’t spray them at trivial work; reserve fan-out for tasks whose parallelism actually pays for the token cost.

Compact at the right time

Long sessions bloat from tool-output accumulation — every file read, shell command, and MCP call appends its full output to context, not a summary. Run /compact around 40–50% context to summarize the conversation into a compact state and reclaim the window before it forces its own (worse-timed) auto-compaction.

Don’t fight the cache

Because the ~33k prefix is cached, the goal isn’t to shrink the tool list (you can’t easily) — it’s to keep the prefix stable so cache reads keep working, and to control the parts that do grow per-turn (CLAUDE.md, MCP output, conversation history). Stable prefix + tight CLAUDE.md + pruned MCP is most of the win.


5. So is Claude Code “wasteful”?

Not exactly — it’s a different point on the tradeoff. Claude Code spends ~33k up front to ship 27 tools including real orchestration (subagents, cron, monitors, worktrees); OpenCode spends ~7k for 10 classical coding tools. If your work is straight-line coding and you want the leanest possible context, a minimal harness like OpenCode genuinely uses less. If you use the orchestration — background agents, scheduled tasks, parallel fan-out — that overhead is the price of features you’re actually using, and caching softens the repeat cost substantially.

The practical stance: measure with /context, then cut what’s yours to cut (CLAUDE.md, idle MCP servers, reckless subagent fan-out) and let prompt caching handle the fixed prefix. Don’t optimize against a sticker number you mostly don’t pay twice.

The takeaway

The “Claude Code sends 33k tokens before your prompt” figure is real (Systima’s measured breakdown: ~24k of it is 27 tool schemas), but it’s a stable, auto-cached prefix — Claude Code requests the 1-hour cache TTL on a subscription, so you pay it in full once and read from cache after. The tokens you actually control are elsewhere: trim CLAUDE.md (a 72KB file added ~20k tokens/request), prune idle MCP servers (~1–1.4k each), rein in subagent fan-out (a measured 4.2× multiplier), and /compact long sessions — inspecting it all with /context. Optimize the parts that grow per turn; let the cache carry the fixed prefix.

For more on running coding agents efficiently, see Claude Code as a daily driver, why long-running agents drift, and fixing llama-server KV-cache reuse for the local-inference version of the same “stop re-processing” idea.

Sources

  • Claude Code vs OpenCode token overhead — Systima — logging-proxy measurement (Claude Code 2.1.207, OpenCode 1.17.18, Sonnet 4.5): ~33k vs ~7k overhead; ~24k of Claude Code’s overhead is 27 tool schemas; 72KB instruction file ≈ +20k tokens/request; 5 MCP servers ≈ +4,900–6,967 tokens; subagent fan-out 121k→513k (4.2×); on Fable 5 the gap narrows to ~3.3×. Single third-party analysis — reported as measured, not universal.
  • How Claude Code uses prompt caching — Claude Code docs — Claude Code prompt-caches the stable prefix and requests the 1-hour TTL automatically on a subscription; cache reads are a fraction of fresh processing
  • Prompt caching — Claude Platform docs — cache_control, 5-minute vs 1-hour TTLs, automatic caching and explicit breakpoints
  • Claude Code /context command — live breakdown of system prompt, tools, memory files, skills, and conversation history; /compact for mid-session compaction
  • Measurements are Systima’s; reduction behavior is from Claude Code’s official docs. Numbers depend on your MCP servers and instruction files — run /context on your own setup. Verified July 13, 2026.