---
title: "How to reduce Claude Code token usage · Cork"
description: "Cut Claude Code token usage with the official levers: /clear, /compact, /context, model and effort choice, a lean CLAUDE.md, subagents, hooks, fewer re-reads."
canonical: "https://corkcli.com/blog/reduce-claude-code-token-usage"
last_updated: "2026-10-03"
published: "2026-10-03"
author: "Kevin Vera"
---

# How to reduce Claude Code token usage

Cut Claude Code token usage with the official levers: /clear, /compact, /context, model and effort choice, a lean CLAUDE.md, subagents, hooks, fewer re-reads.

By Kevin Vera · October 3, 2026 · [Guides](https://corkcli.com/blog/c/guides) · 5 min read

To reduce Claude Code token usage, keep the context small: run `/clear` between unrelated tasks, use `/compact` with instructions when a long task needs continuity, check what is filling the window with `/context`, keep `CLAUDE.md` under 200 lines and move specialist instructions into skills, pick the cheapest model and effort level that does the job, send verbose work to subagents, and write specific prompts so Claude reads fewer files. Every one of those comes from Anthropic's own cost guidance; the biggest single habit is clearing stale context, because Claude Code resends the whole conversation with every request.

## Why usage climbs

Claude Code's docs explain the mechanism plainly: it sends your full conversation with every request, and each tool use sends another request carrying the tool results. Prompt caching makes repeated history cheaper (it is re-read at the cached token rate), but a one-line question in a session open all day still pays for the whole conversation. Other causes the docs list: cache misses after a break longer than the cache lifetime, scheduled tasks, subagents and agent teammates (each with its own context), and compaction itself, which reads the conversation it summarizes.

So the levers are: send less context, send it fewer times, and use cheaper tokens.

## 1. Measure first

- `/usage` shows the session's token usage and cost estimate, including a prompt cache line (share of input from cache, misses). On Pro, Max, Team and Enterprise plans it also attributes usage to skills, subagents, plugins and individual MCP servers.
- `/context` shows what is consuming the context window, including which memory files loaded.
- You can also show context usage permanently in the status line.

Look at these before changing anything, so you know whether your cost is long sessions, MCP overhead or subagents.

## 2. Clear and compact deliberately

- **`/clear`** when switching to unrelated work. Stale context costs tokens on every later message. Use `/rename` first if you want to `/resume` that session later. The docs note that when you want a fresh start, `/clear` costs nothing.
- **`/compact <instructions>`** when you need continuity, for example `/compact Focus on code samples and API usage`. You can also add a `# Compact instructions` section to `CLAUDE.md`. Remember that compacting a large context is itself a large request.

## 3. Keep the always-loaded context lean

`CLAUDE.md` loads into every session. Anthropic recommends keeping it under 200 lines. Move workflow-specific instructions (PR review, migrations) into skills, which load only when invoked. Imports with `@path` organize a file but do not reduce its cost, because imported files also load at launch. Path-scoped rules in `.claude/rules/` load only when Claude works with matching files.

MCP tool definitions are deferred by default, so only tool names and server instructions enter context until a tool is used. Still, disable servers you are not using with `/mcp`, and prefer CLI tools like `gh` when they exist.

## 4. Match model and effort to the task

Sonnet handles most coding tasks and costs less than Opus; switch with `/model`. Thinking tokens are billed as output tokens, so for simple tasks lower the effort level with `/effort`. For subagents doing simple work, set `model: haiku` in the subagent's frontmatter.

## 5. Offload verbose work

- **Subagents** keep test runs, log processing and documentation fetching in their own context and return only a summary. Their requests still count, so give them smaller models.
- **Hooks** can preprocess output before Claude sees it. The cost docs show a `PreToolUse` hook that rewrites test commands to print only failures, reducing tens of thousands of tokens to hundreds.
- **Code intelligence plugins** give Claude "go to definition" instead of grep plus reading several candidate files.

## 6. Ask precise questions

"Improve this codebase" triggers broad scanning. "Add input validation to the login function in auth.ts" lets Claude read one file. Use plan mode (Shift+Tab) for complex tasks so a wrong direction is caught before expensive edits, press Escape to stop a bad path early, and use `/rewind` to go back to a checkpoint.

## 7. Watch agent teams and parallel sessions

Agent teams use roughly 7x more tokens than standard sessions when teammates run in plan mode, according to Anthropic's docs, because each teammate is a separate instance with its own context. Keep teams small, spawn prompts focused, and shut teammates down when they finish. The same logic applies when you run several Claude Code sessions in parallel by hand: each one rediscovers the codebase on its own.

## How Cork helps

Most of the advice above makes one session cheaper. A large share of the remaining spend is agents searching for things another agent, or an earlier session, already found: which function to call, who calls it, what changed. Cork is the [coordination layer](https://corkcli.com/blog/coordination-layer-ai-coding-agents) for multiplayer coding agents: it keeps Claude Code, Codex and Cursor agents, on one machine or across a team's machines, from overwriting each other on one codebase, and hands each agent what the others already learned.

For token usage:

- **Briefing**: when an agent starts or gets a prompt, it is handed the exact signatures, callers and recent changes of the code it is about to touch, so it searches less.
- **No extra model calls**: Cork's hooks do the protocol themselves.
- **MCP tools** `get_symbol` and `blast_radius` answer specific questions without reading whole files, and `recap` reports what happened and what it cost.

In Cork's published benchmark (12 Claude Code agents at once on one repository, hard tasks), agents with Cork used 53% fewer tokens than the same agents without it. Install:

```bash
curl -fsSL https://corkcli.com/install.sh | sh
```

## Frequently asked questions

### Why does Claude Code use so many tokens?

It resends the whole conversation, including tool results, with every request. Long sessions, large files read into context, many tools and subagents all multiply that.

### Does /compact save tokens?

It shrinks later requests, but compacting a large context is itself a large request. If you do not need continuity, `/clear` is cheaper.

### Is Sonnet cheaper than Opus in Claude Code?

Yes. Anthropic's docs recommend Sonnet for most coding tasks and Opus for complex architectural or multi-step reasoning.

### Do MCP servers increase Claude Code token usage?

Less than they used to: tool definitions are deferred by default so only names and server instructions load. Unused servers still add some context, so disable them with `/mcp`.

## Sources

- <https://code.claude.com/docs/en/costs>
- <https://code.claude.com/docs/en/memory>
- <https://code.claude.com/docs/en/sub-agents>
- <https://code.claude.com/docs/en/hooks>
- <https://code.claude.com/docs/en/mcp>
- <https://corkcli.com/benchmarks/study-5-twelve-agents-53-percent>

## Related reading

- [How to reduce token usage when running several coding agents at once](https://corkcli.com/blog/reduce-token-usage-multiple-coding-agents): Several Claude Code, Codex or Cursor agents at once multiply token spend. Cut it with lean shared context, cheaper models, less rediscovery and less rework.
- [Why AI agents re-read the same files, and how to stop it](https://corkcli.com/blog/why-ai-agents-reread-same-files): Why Claude Code, Codex and Cursor agents keep re-reading the same files, and how to stop it: specific prompts, lean context, symbol lookups and briefings.
- [Claude Code subagents vs parallel sessions: when to use which](https://corkcli.com/blog/claude-code-subagents-vs-parallel-sessions): Subagents or parallel Claude Code sessions? Compare context, control, file isolation and cost, with a decision checklist and setup for each, as of October 2026.
- [Claude Code hooks explained: PreToolUse, PostToolUse and team workflows](https://corkcli.com/blog/claude-code-hooks-pretooluse-posttooluse-team-workflows): How Claude Code hooks work: settings locations, PreToolUse allow and deny, PostToolUse checks, SessionStart context, exit codes, and hook patterns for teams.

[All articles](https://corkcli.com/blog.md) · [Cork in Markdown](https://corkcli.com/index.md) · [llms.txt](https://corkcli.com/llms.txt)

This page in HTML: https://corkcli.com/blog/reduce-claude-code-token-usage
