Article may be outdated

This article is 41 days old. Some details may have changed since publication.

Hacker News·3 min read·hard

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

S
systima
AI Summary

A technical analysis compares the token usage efficiency of Claude Code and OpenCode, finding that Claude Code consumes significantly more tokens before processing prompts. The study suggests that Claude Code's caching and harness strategies are less efficient for developers.

Why it matters

Provides empirical data for developers choosing between AI coding tools, impacting operational costs and performance efficiency.

Dive DeeperCreate a free account to unlock

This started based off of a hunch. We usually use OpenCode, but were 'forced' to use Claude Code for a while due to issues with Meridian. In that time, we saw the usage meter rise much, much more quickly than when using OpenCode. This was the initial anecdotal evidence, but we undertook this small study to collect empirical data: We added logging between the agentic coding tool (Claude Code and OpenCode) and Anthropic's endpoint, and captured all requests (and the returned usage blocks). With one caveat (toward the end of the post) we found unambiguously that Claude Code was far more inefficient in terms of its cache strategy and its harness token usage than OpenCode.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologybusiness
Political Bias
Center
LeftLean LCenterLean RRight
Confidence: 80%

Technical comparison based on user-collected data.

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in