Claude Code

How to reduce Claude Code token usage

Clear between tasks, pick the right model, trim CLAUDE.md, and turn off MCP servers you do not use. Then measure whether it worked.

Quick answer

Run /clear between unrelated tasks, use Sonnet or Haiku where Opus is more than the job needs, lower the effort level, and keep CLAUDE.md short. Turn off MCP servers you do not use. Then compare a week of token history before and after.

Changes that work

  1. Run /clear between tasks. It costs nothing, and every later request sends less context.
  2. Run /compact with a note on what to keep when a session gets long.
  3. Pick the model per task. Sonnet handles most edits, and Haiku suits subagents.
  4. Lower /effort for routine work.
  5. Keep CLAUDE.md under about 200 lines and move workflow detail into skills.
  6. Disable MCP servers you do not use, and prefer a CLI tool when one exists.
  7. Use plan mode before big changes so Claude does not explore the same code twice.

Why long sessions burn tokens

Each request resends the whole context. After an idle break the cache expires, so the next request pays full price for it. Subagents and agent teams multiply the count, and Anthropic's cost docs put agent teams at about seven times a single session. Compaction is itself a large request.

Measure the effect

Advice only helps if your numbers move. UsageAtlas shows Claude Code tokens per day and per model. Compare the week before a change with the week after. The token usage guide shows where to look.

Questions, answered

Does /clear use tokens?

No. Clearing costs nothing, and the next request sends a smaller context.

Does switching to Sonnet help with the weekly limit?

It makes the limit last longer, because usage depends on the model. Once a session or weekly limit is hit, switching does not help, since those limits cover all models.

Why do agent teams use so many tokens?

Each agent keeps its own context and makes its own requests. Anthropic's docs put agent teams at about seven times the tokens of a single session.

Browse by topic