HeadlinesBriefing favicon HeadlinesBriefing.com

Claude Code uses far more tokens than OpenCode in coding tasks

Hacker News •
×

The team initially noticed higher token consumption while using Claude Code after being forced to switch from OpenCode due to problems with the Meridian platform. To verify the observation, they instrumented the agentic coding tools to log every request and response exchanged with Anthropic's endpoint, capturing the usage blocks returned by the API.

The logged data showed that, before the model even saw the user prompt, Claude Code transmitted approximately 33k tokens per interaction. In contrast, OpenCode sent only about 7k tokens in the same phase. This difference persisted across multiple runs, indicating a systematic disparity in how the two tools prepare context for the model.

The authors note a single caveat mentioned toward the end of their post, but state that the result remains unambiguous: Claude Code's harness and caching strategy are far less efficient than OpenCode's. The extra tokens are consumed by internal overhead rather than useful prompt content.

For developers concerned with API costs or latency, the findings suggest OpenCode may reduce token usage by more than three‑quarters compared with Claude Code. Lower consumption translates directly to lower bills and faster turnaround when invoking Anthropic's models through these coding assistants.