<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z" -->

---
title: Claude Code Sends 4.7x More Tokens Than OpenCode Before...
description: A detailed empirical comparison of token consumption between Claude Code and OpenCode, measured at the API boundary using a logging proxy. Claude Code&#x27;s...
canonical: https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt | daily.dev
og:description: A detailed empirical comparison of token consumption between Claude Code and OpenCode, measured at the API boundary using a logging proxy. Claude Code&#x27;s...
og:url: https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z
og:image: https://api.daily.dev/og/posts/9m02IOm1Z.png
og:image:alt: Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt

**[Hacker News](https://daily.dev/sources/hn)** · 15 min read · 6 upvotes · 0 comments

## Summary

A detailed empirical comparison of token consumption between Claude Code and OpenCode, measured at the API boundary using a logging proxy. Claude Code's baseline overhead is ~33,000 tokens per request vs OpenCode's ~7,000, driven by 27 tool schemas and injected scaffolding. Cache instability in Claude Code causes 5.9x–54x more cache writes than OpenCode on identical tasks. Real-world configurations (instruction files, MCP servers, subagents) can push first-request overhead to 75,000–90,000 tokens. Subagent fan-out multiplies costs dramatically: a 121k-token direct task ballooned to 513k tokens with two subagents. One counterpoint: Claude Code's parallel tool batching can make multi-step tasks cheaper than OpenCode's serial one-call-per-turn approach. The post includes methodology details, caveats, and instructions for reproducing the measurement rig.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://systima.ai/blog/claude-code-vs-opencode-token-overhead>

## Questions this post answers

### How much token overhead does Claude Code add compared to OpenCode before processing a prompt?

Claude Code sends roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding before a prompt is even processed, compared to about 7,000 tokens for OpenCode on the same claude-sonnet-4-5 model. Most of the gap comes from tool schemas: roughly 24,000 of Claude Code's tokens are tool definitions (27 tools including an orchestration and subagent suite) versus about 4,800 for OpenCode's 10 tools.

_Track token overhead like this when comparing agent harnesses for a production coding setup on daily.dev._

### Why does Claude Code write so many more prompt cache tokens than OpenCode on the same task?

Claude Code's request prefix is unstable across a session, with distinct prefixes for a warmup probe, the main conversation, and subagent calls, causing it to rewrite tens of thousands of cache tokens mid-session. On a matched file-summarize task Claude Code wrote 53,839 cache tokens versus 1,003 for OpenCode, whose byte-identical prefix let it cache once and read cheaply, a gap ranging from 5.9x to 54x depending on cache temperature.

_Understanding cache-write instability helps developers budgeting for agentic coding costs on daily.dev._

### How much do subagents increase token cost when using Claude Code?

Fanning a task out to two parallel subagents in Claude Code increased cumulative metered input from about 121,000 tokens (done directly) to 513,000 tokens, a 4.2x multiplier, because each of the five resulting subagent calls pays its own bootstrap cost of a 3,554-character system prompt plus 24 of 27 tools, and the parent then ingests every subagent's transcript.

_Developers weighing subagent delegation against direct execution can weigh trade-offs like these via daily.dev._

## Similar posts on daily.dev

- [How We Cut Our Claude Code Token Usage 2.8x\!](https://daily.dev/posts/how-we-cut-our-claude-code-token-usage-2-8x--p2fzdwf2l) · Daily Dose of Data Science \| Avi Chawla \| Substack · 0 upvotes · 0 comments
- [I benchmarked Claude Code and OpenCode on a heavy refactor: The reality of agentic CLI workflows](https://daily.dev/posts/i-benchmarked-claude-code-and-opencode-on-a-heavy-refactor-the-reality-of-agentic-cli-workflows-ohlo6vfwb) · LogRocket · 1 upvotes · 0 comments
- [Claude API Token Optimization](https://daily.dev/posts/claude-api-token-optimization-4sbqfmbsk) · SitePoint · 0 upvotes · 0 comments
- [GitHub - drona23/claude-token-efficient: Universal CLAUDE.md - cut Claude output tokens by 63%. Drop-in. No code changes.](https://daily.dev/posts/github---drona23-claude-token-efficient-universal-claude-md---cut-claude-output-tokens-by-63-drop-cba3nnscu) · Hacker News · 3 upvotes · 0 comments

---

Tags: [#claude-code](https://daily.dev/tags/claude-code), [#ai-inference](https://daily.dev/tags/ai-inference), [#context-engineering](https://daily.dev/tags/context-engineering), [#opencode](https://daily.dev/tags/opencode)

[View this post on daily.dev](https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt","url":"https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z"},"datePublished":"2026-07-12T19:03:36.548Z","dateModified":"2026-09-13T18:50:39.169Z","description":"A detailed empirical comparison of token consumption between Claude Code and OpenCode, measured at the API boundary using a logging proxy. Claude Code's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db890bccc0b15890fc810f380ba9b3e3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db890bccc0b15890fc810f380ba9b3e3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"claude-code,ai-inference,context-engineering,opencode","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Claude Code Sends 4.7x More Tokens Than OpenCode Before Reading Your Prompt"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/claude-code-sends-4-7x-more-tokens-than-opencode-before-reading-your-prompt-9m02iom1z#faq","mainEntity":[{"@type":"Question","name":"How much token overhead does Claude Code add compared to OpenCode before processing a prompt?","acceptedAnswer":{"@type":"Answer","text":"Claude Code sends roughly 33,000 tokens of system prompt, tool schemas, and injected scaffolding before a prompt is even processed, compared to about 7,000 tokens for OpenCode on the same claude-sonnet-4-5 model. Most of the gap comes from tool schemas: roughly 24,000 of Claude Code's tokens are tool definitions (27 tools including an orchestration and subagent suite) versus about 4,800 for OpenCode's 10 tools. Track token overhead like this when comparing agent harnesses for a production coding setup on daily.dev."}},{"@type":"Question","name":"Why does Claude Code write so many more prompt cache tokens than OpenCode on the same task?","acceptedAnswer":{"@type":"Answer","text":"Claude Code's request prefix is unstable across a session, with distinct prefixes for a warmup probe, the main conversation, and subagent calls, causing it to rewrite tens of thousands of cache tokens mid-session. On a matched file-summarize task Claude Code wrote 53,839 cache tokens versus 1,003 for OpenCode, whose byte-identical prefix let it cache once and read cheaply, a gap ranging from 5.9x to 54x depending on cache temperature. Understanding cache-write instability helps developers budgeting for agentic coding costs on daily.dev."}},{"@type":"Question","name":"How much do subagents increase token cost when using Claude Code?","acceptedAnswer":{"@type":"Answer","text":"Fanning a task out to two parallel subagents in Claude Code increased cumulative metered input from about 121,000 tokens (done directly) to 513,000 tokens, a 4.2x multiplier, because each of the five resulting subagent calls pays its own bootstrap cost of a 3,554-character system prompt plus 24 of 27 tools, and the parent then ingests every subagent's transcript. Developers weighing subagent delegation against direct execution can weigh trade-offs like these via daily.dev."}}]}
```

