How do I reduce Claude Code token usage?

Updated

Short answer

Keep each conversation short and on one task, and pick a cheaper model. Run /clear between tasks, use Sonnet instead of the default Opus for everyday coding, lower the effort level, and keep CLAUDE.md and your MCP servers lean. These come from Anthropic's own advice.

Usage grows with the length of the conversation, the model and the effort level. Everything below cuts one of those three. Run /usage before and after to see what changed. (Anthropic: manage costs)

1. Clear between tasks

/clear starts fresh, so the next task doesn't carry the last one's history. Use /compact instead when you're continuing the same task. To come back to a conversation later, name it with /rename first and return with /resume.

2. Compact at natural breaks

/compact replaces the conversation with a summary. Tell it what to keep, as in /compact focus on the auth bug fix, or put standing instructions in CLAUDE.md under a "Compact instructions" heading. Compacting is itself a big request, so do it when you finish a step, not in the middle of one, and before you step away rather than after. To drop only the last few turns, /rewind keeps the rest.

3. Use Sonnet for most work

Opus uses your limit faster than Sonnet (its API price per token is twice Sonnet's), and it's Claude Code's default model on paid plans. Sonnet handles most coding well. Switch with /model, or set your default in /config. /model opusplan plans with Opus and writes the code with Sonnet.

4. Lower the effort level

Thinking is billed as output, and a lower effort level means less of it. Set it with /effort (low, medium, high, xhigh or max) or in /model. Choose the model at the start of a session: switching midway means the next request can't use the cache and sends the whole conversation again. On the 5.5 models you can change effort without losing the cache.

5. Keep what's always loaded small

  • Keep CLAUDE.md under about 200 lines. Move instructions you only need sometimes into skills, which load only when used.
  • Run /context to see what's taking up room.
  • Run /mcp and turn off servers you aren't using. Where a command-line tool such as gh does the job, Anthropic suggests it over an MCP server.

6. Keep noisy output out of the conversation

Test runs, logs and long command output fill the conversation fast. Hand that work to a subagent, so only its summary comes back, and for simple subagent tasks set model: haiku in its settings, since subagents draw on your limit too. Agent teams can use about 7x the tokens of a normal session when teammates run in plan mode, so keep them small.

7. Let the cache work

Claude Code caches the conversation so each turn doesn't pay for it in full. On a subscription within your plan's limits, the main conversation's cache lasts an hour and subagents' five minutes; with an API key or on usage credits, five minutes. Switching model and compacting start it over, and so does changing effort on older models. Resuming an old session does too, since its cache is long gone. From v2.1.251, /usage shows a "Prompt cache (main)" line, and from v2.1.242 the promptCacheTtl setting picks 5m or 1h. (Anthropic: prompt caching)

8. Watch what runs while you're away

A session left open can keep spending: scheduled /loop tasks and session recaps use tokens while you're away. Start a fresh session for recurring work. Idle compaction also runs while you're away, but it makes your first message back cheaper, so turn it off with idleCompaction only if you'd rather keep the full conversation.

When the waste is a bug

Sometimes it's not you. These are live on the Claude Code RAP Sheet, each with its reports and any known workaround:

More guides

The tips come from Anthropic's own pages, manage costs, prompt caching, context window and models, usage and limits, checked Nov 2, 2026. Commands change often; when this page and theirs differ, theirs is right.

Give your agent the superpower.

When a tool breaks, your agent checks RAP Sheet for a known bug and its workaround before it spends more of your limit. Free. No account. Works with Claude Code, Codex and any agent that reads skills or AGENTS.md.

npx skills add https://rapsheet.dev