BlogIndustry Analysis

Claude Code Burns 33,000 Tokens Before Reading Your Prompt. We Measured the Hidden AI Agent Tax.

A team spliced a logging proxy between Claude Code and the model endpoint. The open-source alternative uses 4.7x fewer tokens — and Claude Code has a cache instability problem that writes up to 54x more tokens than necessary. Here are the real numbers.

Chethan·July 13, 2026

Claude Code burns through roughly 33,000 tokens before it reads a single word you type.

That's not a typo. Thirty-three thousand tokens of system prompt, tool schemas, and injected scaffolding — fired at the model before your prompt even arrives. A team at Systima spliced a logging proxy between Claude Code and the model endpoint, ran identical tasks on identical hardware, and measured every byte.

The open-source alternative, OpenCode? Seven thousand.

Same model. Same machine. Same task. One harness sends a platform; the other sends a prompt.

This is a story about what your AI coding agent actually costs you, why nobody talks about the tax built into the harness, and why the gap matters more than the benchmark numbers suggest.


The Experiment

Systima wanted a simple answer: when you run an AI coding agent, what does the harness contribute to your token bill before you've done any work?

They set up a logging proxy — about 200 lines of Node.js — that sits between the harness and the model endpoint. Every request body gets captured. Every usage block gets logged. The harness can't lie because the proxy sees everything at the wire level.

Then they ran both Claude Code (v2.1.207) and OpenCode (v1.17.18) on the same model — Claude Sonnet 4.5 — with identical tasks:

  • Task 1: Reply with exactly: OK (isolate fixed overhead)
  • Task 2: Read a file and summarize it (a one-tool task)
  • Task 3: A write-run-test-fix loop on FizzBuzz (multi-step)

Fresh config directories. No MCP servers. No instruction files. No memory. Pure harness, bare metal.


The Floor: Where Your Money Goes Before You Speak

Task 1 — "Reply with exactly: OK" — is 22 characters. Here's what each harness sent alongside it on the first request:

ComponentClaude CodeOpenCode
System prompt27,344 chars (3 blocks)9,324 chars (1 block)
Tool schemas27 tools, 99,778 chars10 tools, 20,856 chars
First-message scaffolding7,997 chars of <system-reminder> blocksNone
First-turn payload~33,000 tokens~7,000 tokens

That's a 4.7x difference. And the breakdown is telling.

OpenCode's request is almost minimal: one system prompt block that opens with "You are OpenCode, the best coding agent on the planet," ten classic coding tools (read, write, bash, grep, etc.), and your prompt. That's it.

Claude Code's request is a platform bootstrap. Those 27 tools aren't just the coding core — they include CronCreate, Monitor, the entire Task family for delegation, worktree management, push notifications. Before your prompt even arrives, Claude Code injects three <system-reminder> blocks: a catalogue of agent types, a catalogue of available skills, and user context.

Roughly 24,000 of Claude Code's 33,000 tokens are tool definitions alone. You're paying to describe 27 tools to the model every single turn, even when you're only using two of them.

Strip the tools out entirely and the gap persists. Claude Code's bare system prompt is 6,500 tokens. OpenCode's is 2,000. Even with zero tools loaded, Claude Code carries three times more behavioral doctrine — tone rules, safety guidance, task-management instructions, environment description.


The Bait and Switch Nobody Mentions

Here's where it gets genuinely ugly.

Prompt caching is supposed to be the answer to this overhead. You pay a premium on the first request to write the cache, then subsequent requests read it back at one-tenth the price. In theory, a 33k-token system prompt is a one-time tax that amortizes over the session.

In practice, Claude Code rewrites its cache prefix mid-session. Repeatedly.

Systima captured the evidence at the wire level. On a matched task, OpenCode's request prefix was byte-identical across every single run. It wrote its cache once, then read it back for pennies. Claude Code, on the same task, rewrote its entire ~43k-token prefix mid-session — not once, but reproducibly across runs.

The numbers: Claude Code wrote 54,339 cache tokens on one run. OpenCode wrote 1,003. That's a 54x difference in cache writes — and cache writes bill at a premium (1.25x for the 5-minute tier, 2x for the 1-hour tier).

They re-ran it to confirm. Not a fluke. Claude Code's mid-session re-writes reproduced across multiple runs and two model families — Sonnet 4.5 and Claude Fable 5. OpenCode showed zero mid-session re-writes in every session they measured.

Think about what that means. A byte-identical prefix is the same content, paid for again at premium rates. That's not buying you better code quality. That's waste by any definition.


The Multipliers: Real Configurations Get Worse Fast

The floor tests used bare configurations — no instruction files, no MCP servers, no workflows. Real development environments have all of those. Systima added them one at a time to measure the compounding effect.

Instruction Files

They dropped a real 72KB AGENTS.md from a production repository into the workspace. Both harnesses gained about 20,000 tokens per request. OpenCode's metered total jumped from 13,000 to 33,000. Claude Code went from 39,000 to 59,000.

But there's a delightful gotcha: Claude Code 2.1.207 silently ignored AGENTS.md entirely. It only ingested the file when renamed to CLAUDE.md. OpenCode read either filename. So if you're using Claude Code and wondering why your instructions aren't being followed, check the filename — and verify at the API boundary, because the harness won't tell you.

MCP Servers

Five modest MCP servers added 5,000-7,000 tokens to every request across both harnesses. The schemas are identical (MCP is a protocol, after all), so the tax is symmetric. But production MCP servers with rich APIs ship schemas several times larger. That's the gentle case.

Also: Claude Code silently ignored a project-scoped .mcp.json until explicitly passed a --mcp-config flag. Silent failures in tool configuration are the kind of thing that makes you question what your agent is actually seeing.

Subagents

This is where the meter explodes.

A small task that cost 121,000 tokens done directly cost 513,000 tokens when fanned out to two subagents. That's a 4.2x multiplier for a single modest delegation.

The mechanism is brutal: every subagent pays its own bootstrap cost (system prompt + tool schemas), does its work, and then the parent agent ingests the subagent's entire transcript. You're paying for the bootstrap twice, the work twice, and the transcript once on top.

If your heavy sessions surprise you with their cost, subagents are the first place to look.

The Everything Number

By the time you stack a real configuration — instruction file, five MCP servers, framework templates — you're 75,000 to 85,000 tokens deep before you've typed a word. On a 200K context window, that's over a third of your working budget consumed by scaffolding before any code enters the conversation.


The One Place Claude Code Wins (And Why It Doesn't Cancel Out)

The multi-step task — the write-run-test-fix loop — told a more nuanced story.

Claude Code completed it in 3 model requests. OpenCode took 9. The reason: Claude Code batches tool calls aggressively, firing off parallel tool execution in a single round trip. OpenCode makes one tool call per turn.

Because the baseline is re-sent on every request, request count multiplies overhead. OpenCode paid its ~7k baseline nine times. Claude Code paid its ~33k three times. The totals converged: Claude Code at ~121,000 metered input tokens, OpenCode at ~132,000.

So on long, multi-step tasks, Claude Code's higher floor gets offset by fewer round trips. The meter starts higher; how the session unfolds decides who spends more.

But here's the thing: this convergence only holds if the task is batchable and if the cache behaves. Remember those mid-session cache re-writes? On any task where the cache breaks, Claude Code re-pays its massive prefix at premium rates. The batch efficiency evaporates.


What This Actually Means

There are three takeaways here, and none of them are "Claude Code is bad."

1. Your AI agent has a hidden tax, and it's bigger than you think. The harness — the software layer between you and the model — can consume 4-5x more tokens than necessary before you've done anything. If you're paying per token (and most people are, eventually), this is real money. Systima has documented cases of 90% LLM cost reductions through intelligent model routing and architecture. The harness is the low-hanging fruit most teams never audit.

2. Open-source harnesses have a structural advantage here. OpenCode's leaner design isn't just about being minimalist for aesthetics. A smaller, stable request prefix means better cache hit rates, lower per-turn costs, and more context budget for actual work. When you control the harness, you control the economics.

3. Auditability is the real unlock. The most important contribution of Systima's work isn't the specific numbers — it's the method. They built a 200-line logging proxy that captures exactly what your agent sends and receives at the wire level. If you can't answer "what exactly did we send to the model last Tuesday," you're flying blind. The token accounting falls out of it for free.


The Bigger Picture

The AI agent space is bifurcating. On one side: closed platforms that bundle the model, the harness, the tools, and the orchestration into a single package — convenient, but opaque about what they send and how much it costs. On the other: open-source harnesses and open-weight models where you control every layer and can measure everything.

The Systima experiment is a preview of the conversation every engineering team needs to have. Not "which model is smartest" — but "what is my agent actually doing, what is it costing me, and can I verify any of it?"

The teams that audit their AI stack — model, harness, tools, caching — will spend less and ship more. The teams that don't will keep staring at usage dashboards wondering why the numbers climb.

You don't need to switch tools. But you should probably know what yours is sending.


If you're tired of opaque AI tools and want an assistant where you can see exactly what's happening — what's sent, what's cached, what it costs — CopperRiver is a desktop AI assistant for Mac that runs open-source models locally and shows you everything. No hidden token tax. No silent failures. Just your agent, your rules.

#Claude Code#OpenCode#AI agents#token costs#prompt caching

Try CopperRiver yourself

A desktop AI assistant that browses, codes, and automates. Plans from $9/mo.

Read next