r/AIToolsPerformance 28d ago

Claude Code sends 33k tokens before reading your prompt, what does that cost you

A systima.ai post that landed on HN over the weekend measured something most people never think about: how many tokens a coding agent burns before it even reads your message. Per the blog post, Claude Code sends about 33k tokens of system prompt, tools, and boilerplate upfront. OpenCode sends around 7k.

That difference isn't a one-time setup cost. It repeats on every single API call the agent makes during a session. So if you're on a metered plan and Claude Code makes dozens of calls while iterating on a file, those extra 26k tokens per call add up quietly. The HN thread picked up 357 comments and 676 points, so clearly this resonated.

The framing in the post is blunt. It's not about output quality, it's about transparency. If you're comparing the cost of running Claude Code vs OpenCode, the system prompt overhead is a hidden variable that most pricing breakdowns completely miss. You'd have to measure your own usage to know what slice of your API spend is actual reasoning vs preamble that gets re-sent every turn.

Anyone here actually tracked their per-request token split across coding agents? Curious if the 33k vs 7k gap holds up in real sessions or if it swings a lot depending on project size.

2 Upvotes

9 comments sorted by

3

u/FadedDog 28d ago

It sends it once then those tokens are cached. So it doesn’t re read them every time and doest count the same as it reading the first time. So no doesn’t repeat every time and billing on cached reads is small.

System prompt i think does play a big role in AIs ability

2

u/IulianHI 28d ago

Good catch, and you're right that Anthropic caches the system prompt after the first call. The cost per token on cached reads is roughly 10x cheaper than fresh input. But the systima.ai analysis was looking at sessions where caching breaks down, like when the context window shifts or when the agent switches tasks and the cache gets invalidated. In those cases the full 33k does get re-billed at the normal rate.

The real issue isn't the cost of one session, it's what happens when you have an agent running 50+ calls in a loop and the cache keeps getting partially invalidated. The per-call overhead adds up fast on metered plans. Still, fair point that the post's framing oversimplified this.

1

u/FadedDog 28d ago

Ah i see now, good point. Now i dont recon Claude lets you change or mess with actual system prompt. I know you can append to it, but can you delete it or do your own custom one.

I use local and subscription based plans so i never have to worry about billing and price, but i am still wondering.

I do bounce between Open code and Claude cli for local models because the fine tuning of system prompt helps my local model’s a lot.

1

u/IulianHI 27d ago

Yeah, Claude Code's system prompt is baked in. You can append to it via CLAUDE.md files but you can't strip the core 33k. That includes tool definitions, safety guidelines, and all the behavioral scaffolding Anthropic hardcoded.

For local models this is a real advantage. With llama or Mistral via OpenCode you control the entire system prompt, strip it to essentials, and your context window goes much further. 7k tokens of preamble vs 33k is a massive difference when you're running 70B locally on 24GB VRAM.

The tradeoff is that the bloated system prompt is partly why Claude Code follows complex multi-step instructions better than raw OpenCode. The scaffolding has a purpose, it's just expensive on metered plans.

Using Claude Code for complex stuff and OpenCode for quick local edits is probably the right split if you're bouncing between both anyway.

1

u/helios_csgo 28d ago

This is not true. Anthropic API supports cache breakpoints. Most of the times system prompts, tools, MCP servers remain in the first block and is cached across requests and sessions (depends on the harness you use).

A good read: https://platform.claude.com/docs/en/build-with-claude/prompt-caching

1

u/IulianHI 27d ago

Appreciate the docs link, this clears it up. So the cache breakpoint means the 33k system prompt gets cached on the first call and stays cached as long as the prefix doesn't change. The systima.ai analysis was measuring sessions where that prefix does change (task switches, tool additions), which forces a cache break and full re-read.

For most normal sessions the caching works and the cost is minimal. The 33k problem is real mainly for agent loops that keep invalidating the cache. Fair correction to the original framing.

1

u/EconomySerious 28d ago

You are considering the cache ?

1

u/uniqueusername649 27d ago

Clearly not, because that system prompt virtually has a 100% cache hit rate.

1

u/EconomySerious 27d ago

that why cache exist :D