AI 编程 5.0 · 必读 2026-07-12 · 文章

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

在 API 边界挂 logging proxy,同模型同机同任务对比 Claude Code 与 OpenCode空仓回 OK:CC 首轮约 33k token 地板 vs OC 约 7k(工具 schema 为主)OC 前缀跨 run byte-identical;CC 中段 cache rewrite 可使 cache-write 最高约 5472KB 指令文件约 +20k/请求;小 MCP 每服约 11.4k;双子 agent 同任务可从 121k513k(约 4.2)多步任务上 batching 有时抹平地板,但换模型后优势可消失读法:先量地板/轨迹/缓存稳定性,再比单价

打开原文回到归档

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

摘要(中文)

在 API 边界挂 logging proxy,同模型同机同任务对比 Claude Code 与 OpenCode。空仓回 OK:CC 首轮约 33k token 地板 vs OC 约 7k(工具 schema 为主)。OC 前缀跨 run byte-identical;CC 中段 cache rewrite 可使 cache-write 最高约 54×。72KB 指令文件约 +20k/请求;小 MCP 每服约 1–1.4k;双子 agent 同任务可从 121k→513k(约 4.2×)。多步任务上 batching 有时抹平地板,但换模型后优势可消失。读法:先量地板/轨迹/缓存稳定性,再比单价。

Summary (English)

API-boundary logging proxy study of Claude Code vs OpenCode on the same model, machine, and tasks. Empty-workspace 'OK' floor: ~33k tokens for Claude Code vs ~7k for OpenCode, dominated by tool schemas. OpenCode prefixes were byte-identical across runs; Claude Code rewrote cache mid-session up to ~54× more cache-write tokens on the same task. A 72KB instruction file adds ~20k tokens per request; modest MCP servers add more; two subagents multiplied a 121k task to 513k (~4.2×). Multi-step batching can erase the floor advantage depending on model behavior. Measure floor, trajectory, and cache stability before comparing $/M.

One-liner

同模型换壳账单差在 harness 地板、请求轨迹与 cache 前缀是否稳定。

Source body / metadata

Fetched via opencli web read / official docs during evening intake. Key claims are grounded in the source page and same-day Obsidian digest notes.

API-boundary logging proxy study of Claude Code vs OpenCode on the same model, machine, and tasks. Empty-workspace 'OK' floor: ~33k tokens for Claude Code vs ~7k for OpenCode, dominated by tool schemas. OpenCode prefixes were byte-identical across runs; Claude Code rewrote cache mid-session up to ~54× more cache-write tokens on the same task. A 72KB instruction file adds ~20k tokens per request; modest MCP servers add more; two subagents multiplied a 121k task to 513k (~4.2×). Multi-step batching can erase the floor advantage depending on model behavior. Measure floor, trajectory, and cache stability before comparing $/M.

Obsidian evidence

  • local_note: 调研/2026-07-22-Coding-Agent-Harness预载税与缓存失稳.md
  • intake_run: daily-intake-evening 2026-07-22