{"slug": "claude-code-s-33k-token-tax-before-you-type", "title": "Claude Code's 33k Token Tax Before You Type", "summary": "Claude Code consumes approximately 33,000 tokens in system prompts, tool schemas, and scaffolding on its first request, compared to OpenCode's 7,000 tokens, a 4.7× overhead that increases session costs. The gap stems from Claude Code's design as a multi-agent control plane with extensive tool definitions and cache writes, which can multiply costs further in production setups. This overhead may be justified for complex agentic tasks but significantly impacts cost calculations for simpler coding sessions.", "body_md": "[AI](https://sourcefeed.dev/c/ai)Article\n\n# Claude Code's 33k Token Tax Before You Type\n\nOpenCode starts near 7k. The gap is design, not a glitch, and it changes session cost math.\n\n[Mariana Souza](https://sourcefeed.dev/u/mariana_souza)\n\nMost developers treat an AI coding agent like a thin shell around a model. Type a prompt, get code. The bill says otherwise. Put [Claude Code](https://github.com/anthropics/claude-code) and OpenCode on the same model, same machine, and the same trivial task, and the harnesses diverge before your prompt is even parsed.\n\nA one-line \"reply with OK\" run shows Claude Code shipping roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding on the first request. OpenCode lands near 7,000. That is about 4.7× more fixed overhead. A clean-environment \"hi\" in Claude Code has been observed around 31,000 tokens in independent reports. The model is not verbose. The agent runtime is.\n\nThat floor is not free context. It is latency, cache-write spend, and working window you cannot spend on source. The practical question is not whether Claude Code is \"worse.\" It is when the heavier platform bootstrap is worth it, and how to stop a production config from turning 33k into 80k before anyone ships a line of code.\n\n## What actually fills the first request\n\nThe dominant cost is not poetry in the system prompt. It is tool schemas.\n\nOn a stripped baseline (no MCP, no instruction files, empty workspace), Claude Code's first-turn payload breaks down roughly as:\n\n| Component | Claude Code | OpenCode |\n|---|---|---|\n| System prompt | ~27k chars, 3 blocks | ~9k chars, 1 block |\n| Tool schemas | 27 tools, ~100k chars | 10 tools, ~21k chars |\n| First-message scaffolding | ~8k chars of reminders | none |\n| User prompt | 22 chars | 22 chars |\n| First-turn total | ~32.8k tokens | ~6.9k tokens |\n\nTool definitions alone account for roughly 24,000 of Claude Code's ~33k tokens, versus about 4,800 of OpenCode's ~7k. Claude Code registers a full orchestration suite on top of the coding core: Task-family tools, worktree management, cron/monitor style agents, push notifications. OpenCode ships a classic coding tool set and a single system block.\n\nStrip tools entirely and the pure harness still differs. Claude Code's system prompt alone is about 6.5k tokens; OpenCode's is about 2.0k. Claude Code also injects first-message reminder blocks (agent catalogues, skills, user context) that OpenCode simply does not send.\n\nSo the 33k figure is not \"Claude is chatty.\" It is a platform that boots as a multi-agent control plane, not a REPL wrapper.\n\n## Cache behavior multiplies the tax\n\nFixed overhead is only half the story. Prompt caching decides whether you pay that overhead once per session or over and over.\n\nOpenCode's request prefix has been measured as byte-identical across runs. That means the expensive prefix can be written to cache once and reread cheaply. Claude Code rewrote large volumes of prompt-cache tokens mid-session on the same task, writing up to 54× more cache tokens than OpenCode in captured runs. Cache writes are billed at a premium. That is why usage dashboards climb even when the human is barely typing.\n\nConfig makes the floor worse. A production-sized instruction file (CLAUDE.md / AGENTS.md) around 72KB adds on the order of 20,000 tokens to every request. Five modest MCP servers add another 5,000–7,000. A real working setup can sit 75,000–85,000 tokens deep before the first user character. Subagents stack the same bootstrap again: a small task that cost ~121k tokens done directly cost ~513k when fanned out to two subagents, because each child pays its own fixed cost and the parent then consumes the transcript.\n\nIf you only look at list price per input token, you will undercount Claude Code. You need cache-write volume and fan-out topology in the model.\n\n## When the heavier harness still wins\n\nThere is a real counter-result, and it matters for agentic work rather than chat.\n\nOn a multi-step write-run-test-fix loop, Claude Code's whole-task total can come out lower than OpenCode's. It batches tool calls into fewer round trips. OpenCode's smaller baseline is paid again every turn. The meter starts higher on Claude Code; the session shape decides who finishes cheaper.\n\nThat is the product bet. Claude Code optimizes for fewer, richer agent turns with a fat tool surface. OpenCode optimizes for a lean, stable prefix that caches cleanly and stays cheap on chatty interactive use. Neither is universally right.\n\n- Prefer Claude Code when the session is long, tool-heavy, and benefits from orchestration (subagents, multi-step fix loops)\n*and*you have trimmed MCP and instruction bloat. - Prefer a lighter harness when you do many short turns, simple Q&A, or cost-sensitive automation where the 33k floor dominates the work.\n- Subagents are a cost multiplier, not free parallelism. Use them when parallelism actually shortens wall time enough to justify 4× token spend.\n\n## What developers should do in practice\n\nTreat the first 20–30k tokens as a fixed product cost, then attack everything above it.\n\n**Measure at the API boundary.** Verbose CLI token displays and usage dashboards are useful, but a logging proxy between harness and endpoint is how you see the actual JSON: system blocks, tool schemas, messages, plus the API usage block (input, cache write, cache read, output). Until you have that, folklore wins.\n\n**Know your real floor before optimizing code.** In Claude Code, use context/usage introspection to see what loaded. Expect a clean session to start near 20–30k even with no repo. Independent bug reports of ~19k–31k on trivial prompts line up with the controlled ~33k baseline measurements.\n\n**Cut the multipliers first, not the model.**\n\n- Keep project instruction files short. A 72KB always-on file is a permanent ~20k tax. Move rare rules out of the hot path; path-scoped rules beat a kitchen-sink CLAUDE.md.\n- Audit MCP servers. Each server dumps schemas into every turn. Five \"modest\" servers already add thousands of tokens; some reports put per-server overhead much higher when tools are chatty. Disable anything not required for the current task.\n- Prefer progressive disclosure (skills loaded on demand) over always-on catalogues when the harness supports it.\n- Filter tool output before it re-enters context. Build logs and raw HTML are classic context poison; compress or summarize at the shell/plugin layer so the model never sees the full dump.\n- Structure sessions: plan, then implement, then verify, with\n`/compact`\n\nor clear between phases when the harness allows. Long monologues of failed approaches are pure tax. - Route models deliberately. Use a cheaper/faster model for mechanical steps; reserve the heavy model for design and hard fixes. The harness tax is paid either way, so do not pay frontier rates for \"list the files.\"\n\n**For cost-sensitive automation, re-evaluate the harness.** If your workload is many short turns with a stable tool set, OpenCode-style lean prefixes (or a custom agent with a minimal tool schema) will beat Claude Code on pure token economics. If your workload is multi-step agent loops that batch tools well, measure end-to-end cost, not first-turn cost, before you switch.\n\n**Sanity-check with token counting before production rollouts.** Count the system + tools + instruction payload offline. If your \"hello\" is already 30k, your monthly agent bill is mostly product scaffolding.\n\n## The honest take\n\nClaude Code's 33k startup is best read as intentional platform weight, not a random regression. The GitHub reports calling 20–30k on \"hi\" a bug are directionally right about the pain and wrong about the nature of the cost: the runtime is shipping a large tool and orchestration surface by default. OpenCode proves you can run a capable coding agent near 7k if you accept a thinner control plane and a cache-stable prefix.\n\nWho wins depends on session shape. Interactive, high-turn, lightly instrumented work favors the lean harness. Deep, multi-tool agent sessions can favor Claude Code's batching if you keep MCP and instruction files under control. Subagents and bloated CLAUDE.md files erase that advantage quickly.\n\nIf you run agentic coding in production, the baseline is not optional knowledge. Log what leaves the harness. Cap always-on context. Treat every MCP server and every subagent as a budget line. The model is only half the invoice.\n\n## Sources & further reading\n\n-\n[Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k](https://systima.ai/blog/claude-code-vs-opencode-token-overhead)— systima.ai -\n[Save 60-90% of Your Claude Code Tokens With Two Tools](https://dev.to/nagell/save-60-90-of-your-claude-code-tokens-with-two-tools-4fh7)— dev.to -\n[[BUG] Excessive token usage (~20k–30k tokens) for trivial prompts in Claude Code CLI · Issue #52979 · anthropics/claude-code](https://github.com/anthropics/claude-code/issues/52979)— github.com -\n[12 Ways to Cut Token Consumption in Claude Code](https://www.firecrawl.dev/blog/claude-code-token-efficiency)— firecrawl.dev\n\n[Mariana Souza](https://sourcefeed.dev/u/mariana_souza)· Senior Editor\n\nMariana covers the fast-moving world of machine learning and generative AI, with a particular focus on how these technologies are reshaping development workflows. When she isn't stress-testing the latest foundation models, she's usually at a local hackathon.\n\n## Discussion 0\n\nNo comments yet\n\nBe the first to weigh in.", "url": "https://wpnews.pro/news/claude-code-s-33k-token-tax-before-you-type", "canonical_source": "https://sourcefeed.dev/a/claude-codes-33k-token-tax-before-you-type", "published_at": "2026-07-12 21:02:11+00:00", "updated_at": "2026-07-12 21:08:53.033831+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models"], "entities": ["Claude Code", "OpenCode", "Anthropic", "Mariana Souza"], "alternates": {"html": "https://wpnews.pro/news/claude-code-s-33k-token-tax-before-you-type", "markdown": "https://wpnews.pro/news/claude-code-s-33k-token-tax-before-you-type.md", "text": "https://wpnews.pro/news/claude-code-s-33k-token-tax-before-you-type.txt", "jsonld": "https://wpnews.pro/news/claude-code-s-33k-token-tax-before-you-type.jsonld"}}