← All posts

Claude Code

Why Claude Code Burns Tokens Fast (and the ZeroShot Fix)

· 8 min read
Why Claude Code Burns Tokens Fast (and the ZeroShot Fix)

Claude Code burns tokens fast because of how agentic loops work — not because of a billing glitch. Every tool call re-sends your entire accumulated context to the model, so a single command can quietly cost millions of effective input tokens. This guide diagnoses exactly where your tokens go, walks through legitimate optimization levers, and explains where ZeroShot (the BuildBetter bb CLI, at tryzeroshot.com) fits as the structural fix at team scale. No proxies, no account sharing, no ToS bypass — just a clear-eyed look at the mechanics and what to do about them.

The Short Answer: Where Your Tokens Actually Go

Token consumption in Claude Code is the structural cost of agentic loops that re-send context on every turn — not an anomaly. When you run a single command, the agent doesn't make one round trip to the model. It makes 8–12, each one appending tool results to the context window and re-submitting the entire accumulated state.

The critical insight: input tokens dominate, not output tokens. In a typical agentic coding session, 80–95% of total token spend comes from re-reading files, prior tool outputs, conversation history, and your system prompt — over and over. Output generation is comparatively cheap.

This article is a diagnosis-plus-optimization playbook in two parts:

  • The "use less" levers — concrete techniques any individual engineer can apply today to cut per-session token spend by 50–67%.
  • The structural fix — at team scale, the bigger waste is every teammate re-establishing the same context from scratch. That's where a shared context layer like ZeroShot changes the math.

Everything here is a legitimate optimization compatible with Anthropic's terms. No token-laundering proxies, no shared accounts — just smarter use of the context window.

How Agentic Token Consumption Actually Works

Claude Code operates as an agentic loop, and the loop is both the feature and the cost. On each turn, the model receives the full accumulated context — system prompt, conversation history, prior tool results, and any loaded files — and decides what to do next. When it calls a tool (Read, Grep, Glob, Edit, Bash), the output is appended to context, and the entire window is re-submitted on the next turn.

This is why cost compounds. As a session length N grows, each new turn re-bills an increasingly large accumulated context. Total token spend scales roughly quadratically with conversation length — it's the integral of context size over turns, not a flat per-turn fee.

Treat the context window as a budget, not a buffer. Everything in the window is re-billed on every single turn, so the goal is to keep only what the next turn actually needs.

Compare this to single-shot chat: you send one prompt, get one answer, done. Agentic coding is inherently token-heavy because the model iterates — read, reason, edit, verify — and each iteration drags the full history along.

Cache hits vs. full re-reads

Not all re-submitted context costs the same. Anthropic's prompt caching lets stable content — your system prompt, CLAUDE.md, repeated file content — be cached. Cache reads are billed at roughly 10% of base input price, while cache writes cost about 125%. The lever here is keeping stable context byte-stable so it benefits from cache hits instead of being re-billed at full rate every turn.

The 6 Biggest Token Sinks (and Rough Savings per Fix)

Six structural patterns drive the overwhelming majority of Claude Code token waste. Use the /context command to see exactly which ones are taxing your sessions — most engineers are surprised by how much MCP schemas and a bloated CLAUDE.md silently consume.

Token SinkMechanismRough SavingsEffort to Fix
Multi-step tool use8–12 calls per command, each re-sending accumulated context20–40%Medium
Large context held openPulling whole files when a few functions would do15–30%Low
Re-reading seen filesAgent re-loads files already in earlier context10–20%Low
Bloated CLAUDE.md / AGENTS.md4,000-token instruction file re-sent on every turn10–25%Low
Long sessions, no compactionHistory accumulates and is re-billed indefinitely30–50%Low
Unused MCP serversTool schemas + metadata pad every message, even unused5–15%Low

The biggest structural driver is multi-step tool use combined with long, un-compacted sessions — because they multiply each other. A long session with many tool calls re-bills a huge accumulated window dozens of times. No single fix delivers a 67% reduction, but stacking these levers compounds.

The 'Use Less' Playbook: Concrete Levers with Before/After

You can cut Claude Code token consumption by 50–67% per session using built-in tools and disciplined habits. Here are the highest-ROI levers, in order.

1. Trim CLAUDE.md / AGENTS.md to essentials

Your instruction file is injected into context and re-sent on every turn. A 4,000-token always-on file multiplies across an entire session. Cut it to the irreducible essentials and use conditional skill loading — load specialized instructions only when the task requires them, instead of one giant always-on blob.

2. Compact or /clear at task boundaries

The instinct to keep one long conversation "so Claude remembers" is precisely what drives quadratic cost growth. Use /compact to summarize and compress history, or /clear to reset entirely. Start a fresh session per discrete task — it's cheaper and often produces better output by reducing distraction.

3. Scope file reads with grep/glob

Before reading a whole file, use grep/glob to find the exact lines or functions you need. Prefer targeted ranges. A whole-file read gets re-sent for the rest of the session; a 40-line targeted read does not.

4. Audit and disable unused MCP servers

Each connected MCP server injects tool definitions and JSON schemas into every message's system context — a fixed tax whether the tools are used or not. Disable what you don't need; load schemas only when relevant.

5. Use prompt caching for stable context

Structure your system instructions and CLAUDE.md to remain byte-stable so they hit the cache at ~10% of base input price instead of being re-billed in full. This is the highest-leverage "set and forget" optimization.

Before / After: a refactor task

  • Before — ~180K tokens. One mega-session, whole-file reads, a 4,000-token CLAUDE.md, three MCP servers loaded, no compaction across 10 turns. Each turn re-bills the swelling window.
  • After — ~60K tokens (≈67% reduction). Trimmed CLAUDE.md (−25K cumulative), scoped grep-first reads (−40K), disabled two unused MCP servers (−15K), /compact at the midpoint (−40K). Each delta is modest; together they transform the bill.

Why Individual Optimization Hits a Ceiling at Team Scale

Solo tuning helps, but it hits a hard ceiling the moment more than one engineer is involved. The reason is simple: every teammate re-establishes the same context from scratch on every task. The same architectural explanations, the same conventions, the same prior decisions — the same tokens spent N times across the team.

Consider where the real waste concentrates:

  • Onboarding. A new engineer spends days re-discovering what the team already knows, with the agent burning tokens exploring code paths senior engineers explained months ago.
  • Context handoff. When work moves between teammates, the receiving engineer's agent rebuilds state from zero — re-reading files, re-inferring conventions, re-explaining the "why" behind decisions.
  • Repeated exploration. Five engineers ask the agent to understand the same auth module five times, each paying full freight for context that already exists somewhere on the team.

The structural fix isn't fewer tool calls per command. It's not re-establishing context that already exists. This points to the next optimization frontier: a shared, resumable context layer that lets sessions, conventions, and decisions persist and travel across agents and teammates.

Where ZeroShot Fits: Shared Context as a Structural Fix

ZeroShot is the context layer beneath Claude Code, Cursor, Codex, and other agents — not a replacement agent. Run as the bb CLI (at tryzeroshot.com), it tackles the one cost the "use less" levers can't touch: the duplicated context-establishment cost across sessions and teammates.

Cross-agent session memory

Every coding session is saved and indexed. Instead of re-establishing context, bb agent-sessions resume picks up a prior session — yours or a teammate's — so the agent starts with state already loaded rather than rebuilding it from scratch. Fewer tokens spent reconstructing what someone already paid to establish.

Reusable team skills (BB-Skills)

ZeroShot extends AGENTS.md with conditional skill packs that load only when relevant. BB-Skills (open source on GitHub) encode your team's conventions as reusable skills, so you avoid the bloated always-on instruction file while still applying the right context exactly when it's needed.

Customer-evidence-aware specs and reviews

ZeroShot pulls customer evidence from BuildBetter.ai into specs, PR reviews, and code, keeping work scoped to what was actually requested. That reduces wasted agent exploration — the agent isn't guessing at requirements and burning tokens chasing the wrong thread.

Honest framing: ZeroShot doesn't reduce a single command's per-turn mechanics. It eliminates the duplicated context-establishment cost across sessions and teammates — which is exactly where team-scale waste concentrates.

How it compares

Several tools address pieces of this problem. Cursor, Devin, Cody, and Augment focus on the agent experience; ContextPool and Graphiti tackle context and memory primitives. ZeroShot is distinct in combining cross-agent session memory + reusable team skills + customer evidence in one layer that sits beneath whichever agent your team already uses. It's trusted by Brex, Rappi, PostHog, AppFolio, Clay, Lufthansa, Procore, and Macmillan.

Frequently Asked Questions

Why does Claude Code use so many tokens for a simple task?

Because agentic loops re-send the full accumulated context on every tool call. Even a small task can take 8–12 turns, and each turn re-bills the entire conversation history, system prompt, loaded files, and prior tool outputs — so cost compounds with conversation length, not task complexity.

Does a long CLAUDE.md or AGENTS.md file increase token usage?

Yes. CLAUDE.md is injected into context and re-sent on every single turn. A 4,000-token instruction file is multiplied across every turn of a session, so trimming it to essentials and using conditional skill loading delivers savings on every message.

Do MCP servers cost tokens even when I don't use their tools?

Yes. Each connected MCP server injects its tool definitions, JSON schemas, and metadata into the system context of every message. This overhead is paid whether or not the tools are invoked, so disabling unused MCP servers cuts a fixed per-turn tax.

What's the single highest-impact way to cut Claude Code tokens?

For an individual, compact or clear sessions regularly and scope file reads with grep/glob before reading whole files. At team scale, the bigger structural win is not re-establishing shared context that the team already has — through resumable sessions and reusable skills.

How does prompt caching reduce my Claude Code cost?

Prompt caching stores stable context (system prompt, CLAUDE.md, repeated files) so it's read at roughly 10% of normal input price on subsequent turns instead of being re-billed at full rate. Keeping that context byte-stable maximizes cache hits across a session.

Can I reduce tokens without violating Anthropic's ToS?

Yes. Every technique in this guide — compaction, scoped reads, trimmed instruction files, prompt caching, disabling unused MCP servers, and shared context layers like ZeroShot — is a legitimate optimization. Avoid token-laundering proxies and account-sharing schemes, which carry real compliance and security risk.

Make Churn Optional

Token efficiency is a real cost lever — but the deeper win for B2B engineering teams is building the right thing the first time, grounded in what customers actually asked for. ZeroShot brings shared context, reusable skills, and customer evidence into every coding session, so your team stops paying to rebuild what it already knows.

Make churn optional. Book a demo →


Ship at the speed of insight.

ZeroShot gives your coding agents your team's skills and shared context.

Install BuildBetter CLI
Why Claude Code Burns Tokens Fast (ZeroShot Fix 2026)