Skip to content

Claude Code vs OpenCode: The 33k Token Overhead Explained

Claude Code sends 33k tokens before your prompt; OpenCode sends 7k. Here's what the Systima study means and how to shrink your own baseline today.

7 min readBeginner

A study from Systima measuring what agentic coding tools actually send over the wire just landed on Hacker News, and the number that stuck was blunt: Claude Code sends 33k tokens before reading your prompt; OpenCode sends 7k. If you’ve been watching your Anthropic bill climb and wondering where the money goes, this is the receipt.

Two ways to react. One: switch tools. Two: understand where the 33k is going and trim what you don’t need. The second wins for almost everyone – because the same batching behavior that makes Claude Code heavy on turn one can actually make it cheaper on a long task. This tutorial shows you how to check your own baseline in about 30 seconds, then act on it.

Key takeaway (read this and skip the rest if you’re in a hurry)

Run /context inside Claude Code. Look at the System tools line. If it’s above ~15k, you have MCP servers or memory files you’re paying for on every single turn. Disable what you don’t need for this session and you’ll claw back a chunk of that overhead without changing tools.

Background: what the study actually measured

The Systima team put a logger between each use and Anthropic’s endpoint and captured every request. Same model, same machine, same task – a 22-character prompt. The result they led with:

  • Claude Code first request: ~33,000 tokens (system prompt + 27 tools + injected reminders + user context blocks)
  • OpenCode first request: ~7,000 tokens (one system block, 10 tools, your prompt)
  • System prompt alone: Claude Code weighs in at 26,891 chars (~6.5k tokens), OpenCode at 8,811 chars (~2.0k tokens)

Everything else – cache behavior, subagents, batching – flows from that starting gap.

Think of it like a contractor showing up on day one. Claude Code arrives with every tool in a full truck: pipe wrenches, tile cutters, the works. OpenCode brings a toolbelt. The truck costs more to drive to the site every morning, whether or not you need the tile cutter. The question is whether the extra capability justifies the fuel.

Method A vs Method B: swap tools, or trim the baseline

Community reactions on HN split predictably into two camps. Camp A says abandon Claude Code, install OpenCode, done. Camp B says stay on Claude Code but stop paying for tools you don’t use. Here’s how they compare on the things that actually matter:

Concern Method A: Switch to OpenCode Method B: Trim Claude Code
Baseline per turn ~7k (byte-identical, cache-friendly) ~33k, reducible by disabling unused MCP servers and memory
Setup cost Reinstall, re-auth, re-learn shortcuts Two commands: /context, /memory
Multi-step task total Pays 7k × N requests (serial) Pays 33k × fewer requests (parallel batching)
Auth situation (as of this writing) Requires API key or paid OpenCode plan – no Claude Pro/Max Works with your existing Claude subscription

Method B wins for most people, and here’s the counter-intuitive reason: on the Systima T3 test (write-run-test-fix loop), OpenCode paid its ~7k baseline nine times while Claude Code paid its ~33k three times – and the totals converged. Claude Code batched two file writes and two script executions into a single parallel tool round trip. OpenCode made one tool call per turn and took nine. Bigger baseline, fewer turns. The meter starts higher; how the session unfolds decides who spends more.

Pro tip: Before you touch anything, run /context once and screenshot it. That’s your “before” number. Every fix below should visibly shrink one of those rows. If it doesn’t, you didn’t fix what you thought you did.

How to actually trim Claude Code’s baseline

Open Claude Code in your project. Type /context and hit enter. You’ll see something like this (real output structure, per the official Claude Code docs and community traces):

Context Usage
claude-opus-4-5-20251101 · 51k/200k tokens (26%)

System prompt: 2.6k tokens (1.3%)
System tools: 17.6k tokens (8.8%)
MCP tools: 907 tokens (0.5%)
Custom agents: 935 tokens (0.5%)
Memory files: 302 tokens (0.2%)
Skills: 61 tokens (0.0%)
Messages: 30.5k tokens (15.3%)
Free space: 114k (57.0%)
Autocompact buffer: 33k tokens (16.5%)

Two things to notice. First, System tools is the fat row – 17.6k just for the built-in tool schemas. You can’t shrink those directly, but you can stop stacking more on top. Second, that Autocompact buffer is a hard 33k reservation (16.5% of your 200k window) you don’t get back. The community has traced this in detail – compaction fires around 167k, and the 33k is what Claude uses to summarize when it does.

Fix 1: Kill the auto-memory fork

Least-known, highest-use. After every user message, Claude Code forks your entire context into a parallel API call to extract memories for future sessions. That fork always cache-misses – you’re paying full input token price for it, invisibly, every turn. The fix takes ten seconds:

# Inside Claude Code:
/memory
# Turn auto-memory OFF

# Or via env var to disable all non-essential background calls:
export DISABLE_NON_ESSENTIAL_MODEL_CALLS=1

Fix 2: Disable MCP servers you don’t need this session

MCP tool definitions load on every single request, whether you touch them or not. Thariq Shihipar (an Anthropic engineer) estimated that 5 MCP servers can add ~55k tokens per turn. That’s more than the entire OpenCode baseline. If you’re coding a Rust CLI and your Gmail MCP is loaded, you’re paying for irrelevant tool schemas on every turn.

Run /mcp to see per-server costs. Disable the ones you don’t need for the current task. Re-enable when you switch context.

Fix 3: Push exploration into subagents

Subagents run in their own separate context window. Anthropic’s own documented example: a subagent read 6,100 tokens of files and returned a 420-token result. Those 5,700 tokens never touched the main window. If you’re about to “grep the whole repo for X” – delegate it. You pay for the summary, not the search.

Edge cases the headline number doesn’t tell you

The 4.7x multiplier is doing a lot of work in the discourse. Three things it doesn’t say:

  1. The gap depends on which model you’re on. Systima’s original test was Sonnet 4.5, which produced the 4.7x multiple. Re-running on a newer Claude model variant narrowed the gap to about 3.3x, because Claude Code sends newer models a smaller system prompt. Your number will vary with your model selection.
  2. Cache writes are billed at a premium, and Claude Code churns them. Systima found Claude Code rewrote up to 54x more cache tokens than OpenCode on the same task. That churn – not just the baseline – is what’s inflating some users’ dashboards.
  3. Third-party OAuth access to Claude is blocked (as of this writing). Anthropic has blocked tools like OpenCode from using Claude via consumer OAuth tokens. If you planned to run OpenCode on your Claude Max subscription, check the current OpenCode documentation for the latest workarounds and paid-plan options before switching.

So the choice isn’t binary. It’s: are you optimizing for cost, control, or ceremony?

What to do next (concrete, not a summary)

Open Claude Code right now. Run /context, note the total. Then /memory → disable auto-memory. Then /mcp → disable one server you haven’t used today. Run /context again. If the total didn’t drop by at least 3-5k tokens, your session was already lean – you’re done. If it dropped by more, you just found free money. Repeat weekly.

Want to measure without spending tokens? Anthropic’s token counting endpoint (POST /v1/messages/count_tokens) is free and accepts the same inputs as a real message.

FAQ

Is OpenCode actually cheaper than Claude Code overall?

Not always. On single-turn tasks, yes – 7k vs 33k is hard to argue with. But on multi-step agentic loops, Claude Code’s parallel batching can pull the totals even or ahead. The Systima T3 result showed both tools converging on the same write-run-test-fix task despite the baseline gap. Task shape matters more than the headline number.

Why doesn’t Anthropic just ship a smaller system prompt?

The 27 built-in tool schemas are the main weight. OpenCode ships 10. More tools means more schemas loaded on every request – that’s the core tradeoff, not bloat. A leaner default may come from community pressure post-study, but as of this writing there’s no announcement.

Does the 200k context window compensate for the overhead?

Partially – but the autocompact buffer alone eats a fixed 33k of that window before you type anything. The window is large; it’s not free. Whether the remaining space is enough depends entirely on your project size, which is an honest “it depends” rather than a reassurance.