← News·Claude Code·2 days ago

Claude Code vs OpenCode token overhead study

A small logging-based comparison found Claude Code consumed far more harness and cache-token budget than OpenCode for the same kinds of requests.

Published 13 Jul 2026Source Hacker NewsRead 1 min

I ran into a practical issue recently that’s now backed by a short empirical write-up: Claude Code can spend dramatically more tokens before it starts “doing the work” on your prompt.

The post (via Hacker News) describes a team that initially used Claude Code only due to operational constraints (Meridian issues), then noticed their usage meter rising much faster than with OpenCode. To move from anecdote to data, they instrumented the request path between the agentic coding tool (Claude Code / OpenCode) and Anthropic’s endpoint, capturing all calls and the returned usage blocks.

Their reported result is straightforward: Claude Code sends much larger pre-read / harness context before reading the effective prompt. In the cited examples, one tool was measured around 33k tokens before prompt consumption, while OpenCode was closer to 7k.

Where this matters for engineers: if you’re running agentic coding in a loop (e.g., multi-file edits with retries) under tight cost/latency budgets, “prompt overhead” turns into a first-order factor.

What to look at first in your own setup:

- Your tool’s initial request token usage and any “cached” token accounting. - Whether the tool is re-sending large harness/context blocks across steps. - The number of agent iterations per task (small overhead × many turns). - The entry point in your workflow where you can set/limit context or choose the coding tool.

If you’re building solo-dev or small-team agent tooling on FastAPI/LangGraph, this is an easy knob to audit in production logs: measure tokens-per-iteration, not just total completion tokens.

Why it was picked: A very practical, shipping-oriented datapoint for Claude Code workflows: the HN study compares token/cache overhead between Claude Code vs OpenCode, directly relevant to a solo AI studio optimizing cost/latency on Anthropic Claude + agent tooling. High technical signal for production agent engineers (token efficiency, cache strategy, empirical logging), beating broad repo lists and less concrete Medium posts.