Claude Code sends 33k tokens before reading your prompt; OpenCode sends 7k. That 26k token difference directly impacts your API bill and response latency. Here is what causes it and how to decide which tool fits your workflow.
Where Do Those Tokens Go?
Both tools are agentic coding assistants that run in your terminal. They read your codebase, build context, and then execute commands. The overhead comes from system prompts, tool definitions, and initial file reads.
Claude Code uses a large system prompt that includes detailed instructions for tool use, safety rules, and formatting constraints. It also pre-loads a set of common files (like package.json, tsconfig, .gitignore) and runs git diff to understand the current state. All of this happens before it sees your actual question.
OpenCode takes a leaner approach. Its system prompt is shorter, and it only reads files you explicitly reference or that are directly relevant to the task. It does not pre-load the entire project context unless needed.
Token Breakdown
I ran a test on a mid-sized TypeScript project (150 files, 40k LOC) with both tools. Here is what I found:
- Claude Code: 33k tokens before prompt. Breakdown: system prompt (12k), tool definitions (8k), git diff (5k), auto-loaded files (8k).
- OpenCode: 7k tokens before prompt. Breakdown: system prompt (3k), tool definitions (2k), git diff (1k), auto-loaded files (1k).
These numbers vary by project size. On a larger monorepo, Claude Code can hit 50k+ tokens before your prompt. OpenCode stays under 10k because it does not scan the entire repo.