Claude Code はプロンプトを読み込むまでに約3万トークンを消費し、OpenCodeは7,000 トークンである。
## Japanese Translation:
主要な知見は、セッションの段階と設定の複雑性に 따라 Claude Code と OpenCode の間でのトークン使用ダイナミクスが著しく異なることを示しています。標準的な設定において、Claude Code は非効率的なシステムプロンプト、キャッシュ管理のために数万のトークンを再記述し、堅牢なフレームワークテンプレートにより引き起こされる大規模な初期オーバーヘッド(約 33,000 トークン)を被る一方、OpenCode の床は低い(約 7,000 トークン)ため、大きな差を生じています。ただし、Fable 5 のような新しいモデルではこの隙間が縮小します。特に、複雑な本番環境設定においては、OpenCode 自身のツール呼び出しのシリアライゼーションとスキーマサイズによる影響で、最初のリクエストでより高いトークン負荷(Claude の約 75,000 トークンに対し、約 90,817 トークン)を被り、その後のリクエストで安定化するまで要請されます。新しいモデルは命令セットのサイズを削減しますが(例:27k から 10k クラクターへ)、特定のコストドライバーは残っています:対話履歴と乗算される延長された思考ブロック、「フレームワーク税」として作用する大規模な静的フレームワークテンプレート(例:AGENTS.md)、およびバーストコストを増幅するサブエージェントのファンアウト構造。さらに、本研究では EU AI Act のログ記録要件への準拠を確保し完全性を保証するために、キャッシュの書き込みと課金構造の違い(例:キャッシュされた読み取り対課金されるプレミアム書き込み)を検証できるよう、185 件のレコードを捕捉した SHA-256 ハッシュ連鎖監査軌跡を利用しました。
## Text to translate:
The primary findings indicate that token usage dynamics vary significantly between Claude Code and OpenCode depending on the session stage and configuration complexity. While Claude Code incurs a massive initial overhead (~33,000 tokens) compared to OpenCode's low floor (~7,000 tokens) in standard setups—driven by inefficient system prompts, rewriting tens of thousands of tokens for cache management, and rigid framework templates—this gap narrows with newer models like Fable 5. Notably, in complex production configurations, OpenCode's first request can incur a higher token load (~90,817 tokens vs. ~75,000 for Claude) due to its own serialization of tool calls and schema sizes before stabilizing on subsequent requests. While newer models reduce instruction set sizes (e.g., from 27k to 10k characters), specific cost drivers remain: extended thinking blocks that compound with conversation history, large static framework templates (e.g., AGENTS.md) that act as a "framework tax," and subagent fan-out structures that multiply bootstrap costs. Additionally, the study utilized a SHA-256 hash-chained audit trail capturing 185 records to ensure integrity and support compliance with EU AI Act logging requirements, verifying that both architectures handle cache writes and billing structures differently (e.g., cached reads vs. billed premium writes).