Blog · Claude Code

How to reduce Claude Code token usage (and stop hitting limits)

Claude Code sends your whole conversation with every request, so token usage grows with context: a one-line question late in a long session costs far more than the same question in a fresh one. This guide shows how to see where your tokens go, then twelve changes from Anthropic's own docs that cut usage, from /clear and /compact to choosing the model and effort, trimming CLAUDE.md and MCP servers, and moving noisy work into hooks, skills and subagents.

First, see where your tokens go

ToolWhat it shows
/usageSession tokens and estimated cost; on Pro, Max, Ultra, Team and Enterprise, plan usage bars, a breakdown by skills, subagents, plugins and MCP servers, recommendations, and your heaviest /loop tasks
/contextWhat's filling the context window right now
Status lineContext usage shown continuously, if you configure it
Spinner countThe output tokens of the current turn, such as ↓ 5.5k tokens; it doesn't include your context
/insightsAn HTML report on how you work across recent sessions, with friction points and suggestions

Why usage climbs in a long session

  • Long context: every request carries the full conversation, and every round of tool calls sends another request. Caching makes re-reads cheaper, not free.
  • Cache misses: your first message after a break longer than the cache lifetime reprocesses the whole context.
  • Things that run while you're idle: session-scoped scheduled tasks and /loop, messages from your other sessions, goal check-ins, session recaps and idle compaction.
  • Parallel workers: each subagent, workflow agent and agent-team teammate sends its own requests. Agent teams use about 7x the tokens of a standard session when teammates run in plan mode.
  • Compaction itself: /compact has to read the conversation it summarizes. /clear costs nothing.

12 ways to reduce Claude Code token usage

  1. Clear between unrelated tasks

    /clear starts a fresh conversation, so stale context stops riding along. Run /rename first if you want to /resume it later.

  2. Compact with instructions

    /compact Focus on code samples and API usage tells Claude what to keep. You can also put standing compact instructions in CLAUDE.md.

    # Compact instructions
    
    When you are using compact, focus on test output and code changes.
  3. Use the right model

    Sonnet handles most coding and costs less than Opus; keep Opus for architecture and hard reasoning. Switch with /model, and give simple subagents model: haiku.

  4. Lower the effort for simple work

    Thinking tokens bill as output and can run to tens of thousands per request. Lower the level with /effort for routine tasks.

  5. Keep CLAUDE.md short

    It loads in full every session. Stay under about 200 lines and move workflow-specific instructions into skills, which load only when used. See the CLAUDE.md guide and Claude Code skills.

  6. Trim MCP servers

    Tool definitions are deferred by default, but every server still adds names and instructions. Disable unused ones in /mcp, and prefer CLIs such as gh, aws or gcloud, which add no per-tool listing.

  7. Filter noisy output with a hook

    A PreToolUse hook can rewrite test commands to keep only failures, turning tens of thousands of tokens of logs into hundreds. Anthropic's docs include a ready-made filter script.

    {
      "hooks": {
        "PreToolUse": [
          {
            "matcher": "Bash",
            "hooks": [
              { "type": "command", "command": "~/.claude/hooks/filter-test-output.sh" }
            ]
          }
        ]
      }
    }
  8. Delegate verbose work to subagents

    Running tests, reading docs or processing logs in a subagent keeps the output in its context; only a summary returns. Give those subagents a smaller model.

  9. Install code intelligence plugins

    For typed languages, a language-server plugin answers "go to definition" in one call instead of a grep and several file reads.

  10. Write specific prompts

    "Add input validation to the login function in auth.ts" reads a few files; "improve this codebase" scans everything.

  11. Plan first, stop early

    Use plan mode for big changes so a wrong direction is caught before code is written; press Escape the moment Claude heads off course, and /rewind to a checkpoint.

  12. Watch what runs while you're away

    Each scheduled task, /loop run or idle message sends your full context. Stop loops you don't need, set crossSessionInbound to hold to queue messages from other sessions, and check the Loops rows in /usage.

Source: Claude Code docs, Manage costs effectively

Usage limits and team costs

On Pro, Max and Ultra, usage counts against your plan's limits rather than a bill; see Claude Code vs Codex for how the 5-hour and weekly limits work. On the API, Anthropic reports an enterprise average of around $13 per developer per active day and $150 to $250 a month, with 90% of users under $30 a day.

Admins can set spend limits for teams, and a modelPricing table in managed settings makes /usage show contracted rates instead of list price.

With Crewmark

Agents that work on a schedule, without burning tokens all night

Anything that wakes a session sends its whole context, so an always-on agent needs limits. Crewmark turns a Claude Code, Codex, DeepSeek Harness or OpenCode session into an AI employee that wakes on a heartbeat only during the working hours you set.

  1. Set working hours and a rhythm

    Choose every 15, 30 or 60 minutes, and the hours it's on the clock; outside them it sleeps. See how to make Claude Code proactive.

  2. One issue at a time

    Each heartbeat takes the next issue from the board, so the session works on a focused task instead of open-ended exploration.

  3. On the plan you already pay for

    Employees run on your existing subscription, counted against your plan's limits. Read what an AI employee is.

Claude Code token usage FAQ

Why does Claude Code use so many tokens?

It sends the full conversation with every request, and each round of tool calls is another request. Long sessions, cache misses after breaks, subagents and anything that runs while you're idle all add up.

How do I check my Claude Code token usage?

Run /usage for session tokens, plan usage and a breakdown with recommendations, and /context to see what fills the context window. A status line can show context usage all the time.

What's the fastest way to save tokens?

Run /clear between unrelated tasks, use Sonnet unless you need Opus, and keep CLAUDE.md short. Those three cover most waste.

Does /compact save tokens?

It shrinks the context for later messages, but the compaction itself reads the whole conversation, so it's a large request. If you don't need continuity, /clear costs nothing.

Do MCP servers use tokens?

Tool definitions are deferred until used, but each server still adds tool names and instructions. Disable servers you don't use and prefer CLI tools where they exist.

Why did I hit my usage limit so fast?

Usually a long session, a few cache misses, or background work such as /loop, scheduled tasks, subagents or agent teams. /usage on a paid plan shows which of these is behind your recent usage.

Do subagents save tokens?

They keep verbose output out of your main conversation, which keeps later requests small, but their own requests still count. Give them a smaller model to spend less.

Checked against the Claude Code docs (Manage costs effectively) on November 6, 2026.

Put Claude Code to work on a schedule you control.

Crewmark turns Claude Code, Codex and DeepSeek Harness sessions into AI employees with roles, goals, working hours and a heartbeat.