Claude Code context and token efficiency
TECH

Claude Code context and token efficiency

25+
Signals

Strategic Overview

  • 01.
    A Systima benchmark found Claude Code sends about 4.7x more tokens than OpenCode before the user's prompt is read - a ~32,800-token baseline vs OpenCode's ~6,900.
  • 02.
    In a realistic setup with MCP servers and instruction files, that overhead climbs to roughly 75,000 tokens - about one-sixth of a 200k window - before any code is loaded.
  • 03.
    Context rot - the gradual decline in output quality as the window fills - starts well below the stated 200k limit and is not a hard cliff.
  • 04.
    Using Insforge Skills + CLI as a context-engineering layer cut one workload from 10.4M to 3.7M tokens (~3x), errors from 10 to 0, and cost from $9.21 to $2.81.

Why the baseline is heavy before you type a word

Why the baseline is heavy before you type a word
Claude Code vs OpenCode token overhead: pre-prompt baseline and cache writes on an identical task (Systima benchmark).

Claude Code's overhead is structural, not accidental. Its system prompt is model-conditional - 27,787 characters sent to Sonnet versus 10,526 to Fable - and it bundles large tool schemas (trimmed from 99,778 to 82,283 characters), which together push the first-turn baseline to about 32,800 tokens against OpenCode's ~6,900 [1]. Add MCP servers and CLAUDE.md files and the pre-prompt payload rises to roughly 75,000 tokens, about one-sixth of a 200k window consumed before any code loads [4]. The subtler tax is caching: rather than reusing a byte-identical cached prefix the way OpenCode does, Claude Code advances its cache breakpoint each turn and re-writes tens of thousands of cache tokens mid-session, writing up to 54x more cache tokens (53,839 vs 1,003) on an identical file-summarize task [1].

Context rot is a second, different failure that compounds the first

Pre-prompt bloat shrinks the budget; context rot degrades what you do with it, and the two stack. Jake Minns distinguishes intrinsic rot - a fixed attention budget whose signal-to-noise falls as tokens pile up - from content rot, the accumulation of stale or contradictory notes from tool calls and failed attempts [2]. The decline is gradual and starts early rather than at a cliff: retrieval accuracy drops more than 30% when the relevant information sits in the middle of the window [2]. Practitioners describe the symptoms vividly - output quality tanking well before the nominal limit, and the agent revisiting solved problems and retrying failed approaches - with the community converging on 'context rot' as the name for why a bigger window does not guarantee better results.

The verdict: it's a harness problem, and the subagent fix cuts both ways

The dominant community read is that this is a discipline problem, not a model problem - captured in the widely-shared 'stop blaming Claude, your harness is the problem' setup post, which reports context discipline roughly halving token usage. But the favored remedy, subagents, splits opinion. Commenter a_c warns every subagent resends the same ~30k system prompt, easily eating 30% of a 5-hour window across seven subagents before real work begins [5]; mips_avatar counters that those shared prompts are cache reads, roughly 10x cheaper than a full prefill [5]; and wongarsu notes slow subagents can evict the orchestrator's context from cache so it must be re-paid at full price [5]. Dedicated context layers show the upside is real: an Insforge Skills + CLI setup cut one workload from 10.4M to 3.7M tokens and 10 errors to 0 [3], and community demos of MCP virtualization layers claim similar savings, though such results draw healthy skepticism until independently reproduced.

Historical Context

2026-07-12
Systima published the HTTP-proxy benchmark establishing the 4.7x pre-prompt token gap between Claude Code and OpenCode; a day later, on 2026-07-13, GIGAZINE reported the ~33k and ~75k overhead figures and amplified the benchmark to a broader audience.

Power Map

Key Players
Subject

Claude Code context and token efficiency

SY

Systima

AI consulting firm that ran the HTTP-proxy benchmark quantifying Claude Code vs OpenCode token overhead at the API boundary; source of the 4.7x and 54x cache figures.

AN

Anthropic (Claude Code)

Vendor of Claude Code; caches the system prompt, tool defs, CLAUDE.md, and history but advances the cache breakpoint each turn, causing repeated cache writes. No official response to the benchmark appears in public discussion.

OP

OpenCode

Open-source competing coding agent that sends a byte-identical, low-overhead (~7k) request prefix reusing cache cheaply; used as the efficiency baseline in the benchmark.

AV

Avi Chawla (Daily Dose of DS)

Practitioner and author who reported the 3x token reduction and zero-error result from the Insforge Skills + CLI context layer.

IN

InsForge

Open-source (Apache 2.0), self-hostable backend and context-engineering framework using scoped Skills for static knowledge and a CLI for direct backend ops to cut Claude Code context bloat.

Fact Check

5 cited
  1. [1] Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt
  2. [2] Governed Context: Managing Context Rot in Claude Code
  3. [3] Claude Code Used 3x Fewer Tokens With One Change
  4. [4] Claude Code is consuming a huge number of tokens before reading your prompt
  5. [5] Claude Code sends 4.7x more tokens than OpenCode (Hacker News)

Source Articles

Top 4

THE SIGNAL.

Analysts

"Context rot has two forms - intrinsic decay from a fixed attention budget and content rot from stale or contradictory accumulation - so the useful token budget sits well below the stated limit and erosion begins early."

Jake Minns
Author, Towards Data Science

"Every subagent send the same ~30k system prompts. If you are using fable/opus, that's easily 30% of a 5-hour window for 7 subagent, before doing any work."

a_c
Hacker News commenter

"The shared prompts are all cached so it's a cache read which is like 10x cheaper than a regular prefill."

mips_avatar
Hacker News commenter

"If they take too long, your orchestrator's context is no longer in cache so you pay full price for that again once the subagents finish."

wongarsu
Hacker News commenter
The Crowd

"Great thread on reducing Claude Code token up to 60% Best one is using the open-source tool RTK (Rust Token Killer) It automatically removes noise, merges repeated content, and strips useless blank lines and progress bars. More details down in @aibuilderclub_ 👇 https://t.co/tRFYCbnjYA"

@@jasonzhou19931945

"I edited the intro because I realized I buried the lede originally- The 1M context window is a double-edged sword. It allows Claude to do more complex tasks but it can also leads to more context pollution if you don't manage your session well. This is how you do that:"

@@trq2121611

"Claude Code used 3x fewer tokens with one change: - Before: 10.4M tokens · 10 errors · $9.21 - After: 3.7M tokens · 0 errors · $2.81 I used Insforge Skills + CLI as the backend context engineering layer for Claude Code (open-source and local). Repo: https://t.co/ACu2d1oaJ1 https://t.co/1sd4nGnqV0"

@@_avichawla925

"My full Claude Code setup after months of daily use — context discipline, MCPs, memory, subagents"

@u/Sictir11100
Broadcast
How Claude Code Works

How Claude Code Works

Context Management in Claude Code

Context Management in Claude Code

Claude Code is Expensive. This MCP Server Fixes It (Context Mode)

Claude Code is Expensive. This MCP Server Fixes It (Context Mode)