The Daily Commit · Section Edition Front Page PHP AI Dev EN DE FR ES

TheModelDesk

July 12, 2026
models, agents & local inference

News

Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

A comparative study reveals Claude Code consumes significantly more tokens upfront than OpenCode before processing user prompts. Analysis of API logging shows Claude Code's inefficient cache strategy and harness token usage, with token overhead roughly 4.7× higher, raising cost implications for agentic coding workflows.

Systima researchers compared Claude Code and OpenCode by intercepting API calls between each harness and the model endpoint, measuring tokens consumed before user prompts arrived and throughout task execution. Claude Code sent approximately 33,000 tokens of system prompts, tool schemas, and scaffolding before processing any user input, versus 7,000 tokens for OpenCode—a 4.7× difference that directly reduces available context for actual work.

Cache efficiency revealed the starkest contrast. OpenCode's request prefix remained byte-identical across runs, allowing single cache writes that subsequent requests read cheaply. Claude Code rewrote tens of thousands of prompt-cache tokens mid-session repeatedly, consuming up to 54× more cache tokens than OpenCode on identical tasks. Since cache writes are billed at premium rates, this pattern drove visible cost increases in production dashboards.

Production configurations amplified the baseline overhead. A typical 72KB instruction file (AGENTS.md or CLAUDE.md) added ~20,000 tokens per request. Five modest MCP servers contributed 5,000–7,000 tokens each. By the time a realistic setup sent its first request, 75,000–85,000 tokens had already been consumed before users typed anything. Subagent architectures multiplied this cost: a task costing 121,000 tokens directly jumped to 513,000 tokens when fanned to two subagents, because each subagent independently re-reads its full system prompt and tools per turn.

One scenario favored Claude Code: on multi-step tasks, batching multiple tool calls per request sometimes reduced total requests compared to OpenCode's per-turn overhead, yielding lower overall costs. However, when researchers re-ran the same task on a newer model, Claude Code required twice as many requests and consumed ~298,000 tokens versus OpenCode's 133,000—reversing the advantage. The researchers validated all findings across two model families and used a logging proxy to capture exact JSON payloads and metering data from the API, establishing ground truth for where tokens were spent.

Read the original source ↗

Rate this article: 0

Readers’ Forum

No contributions yet — open the debate.

← The Model Desk — Page C1

Models, agents & local inference · The Daily Commit · Screen edition · Imprint · Privacy Policy