Where did my Claude Code tokens go?

How to see what Claude Code spent your tokens on, why long sessions add up, and what its dollar figures mean for what you actually pay.

Short answer

Token use grows with context. Claude Code sends your whole conversation with every request, so a short question in a long session still draws on all of it. To see where yours went, run /usage: on a paid plan it splits recent usage by skills, subagents, plugins and MCP servers. /context shows what fills the current chat. Dollar figures are estimates at API list prices, not a bill.

Check Claude Code token usage with /usage

Claude Code answers most of this itself, in three places:

The breakdown is the real answer to "where did my tokens go". Each recommendation starts with the share of recent usage it applies to, such as 25% Trim ~/code/api/CLAUDE.md · 49k tokens per request. From version 2.1.305, press f in the terminal, or click the Fix button in VS Code, to have Claude Code act on the ones it can (cost guide, VS Code docs).

For a longer view, open the Stats tab in the terminal, without leaving VS Code:

  1. Open VS Code's terminal. Choose Terminal > New Terminal, or press Ctrl+`, which uses Control on a Mac too (VS Code's terminal guide). Running claude there needs the standalone install, because the extension doesn't add it to your PATH (VS Code docs).
  2. Start Claude Code. Run claude. It shares conversation history with the extension (VS Code docs).
  3. Type /stats. It opens /usage on the Stats tab (commands): token totals, a daily token chart, your favourite model, your streak and an activity heatmap (changelog).
  4. Type /context. It draws the context window as a coloured grid, with suggestions when tools or memory files fill much of it (commands).

In the terminal, a status line from /statusline can keep context and cost on screen, though its cost "may differ from your actual bill" (status line docs).

Why long sessions use so many tokens

Claude Code sends your full conversation with every request, and each time Claude uses tools, another request carries the results. Caching makes the repeats cheaper, but a one-line question in a session open all day still draws usage for the whole conversation (cost guide).

The same guide names other usual causes:

What helps, from its reduce token usage section:

Where Claude Code keeps the numbers

The breakdown, the Stats tab and the tools below work from history on your computer, mainly one transcript file per chat:

~/.claude/projects/<project>/<session-id>.jsonl

<project> is your working folder's path with everything except letters and digits turned into dashes (sessions docs). Worth knowing:

Free command-line tools: ccusage and others

For totals by day, month or session, free tools add up the same files. One is ccusage, "a fast local CLI for tracking tokens and estimated costs" that works "without uploading your data" (ccusage). It runs without an install (getting started):

npx ccusage@latest                  # daily report, every coding CLI it finds
npx ccusage@latest claude monthly   # Claude Code, by month
npx ccusage@latest claude session   # Claude Code, by session

It reads ~/.claude/projects/ and ~/.config/claude/projects/. If you keep a settings folder per account, list the folders in CLAUDE_CONFIG_DIR, separated by commas. That replaces the defaults, so include ~/.claude too (ccusage: Claude Code data source):

CLAUDE_CONFIG_DIR="$HOME/.claude,$HOME/.claude-work" npx ccusage@latest claude monthly

Claude Code Usage Monitor is another option: a live terminal view with burn rate and forecasts. Install it with uv tool install claude-monitor, then run claude-monitor (GitHub). For tools that work inside VS Code, see ccusage alternatives.

Claude Code usage stats inside VS Code, with Layers

If you'd rather see your history in VS Code's sidebar, there's Layers for Claude Code. I make it. It's a free extension that sits on top of Anthropic's Claude Code extension, and it's unofficial: Anthropic doesn't make or support it.

Its Analytics section is worked out on your computer from the history Claude Code keeps: tokens, prompts, estimated cost at API prices, streaks, your busiest hours, your top tools, models and projects, and a This project view.

The Analytics section of the Layers sidebar: a This project card for the last 7 days with prompts, tokens and an API-equivalent cost, then tiles for tokens today, prompts today, cost this week and a streak in days, and a row of lines added and removed.
Analytics in the Layers sidebar, with sample data. Costs are API-price estimates.

The Overview tab also shows the chat you're in: its model, how full its context is and what it has cost so far. Helpers Claude starts appear live while they run.

Layers is on the VS Code Marketplace, and VS Code installs Claude Code along with it.

Estimated cost vs. what you pay each month

Claude Code works out its dollar figures on your computer, from token counts at list price (cost guide). What that number means depends on how you pay:

How you payWhat you payWhat the dollar figure means
Pro or Max planThe plan price. As of October 2026, Pro is $20 a month ($17 a month billed yearly) and Max is $100 or $200 a month (pricing, Max plan).Not your bill: Anthropic says it "isn't relevant for billing purposes" for Pro and Max (cost guide).
Usage credits on Pro or MaxUsage past your limits, at standard API rates (pricing).An estimate. See this month's credit spend on claude.ai under Settings > Usage (cost guide).
API key or Claude ConsoleEvery token, at API prices.An estimate. For billing, see the Usage page in the Claude Console (cost guide).
Team or EnterpriseYour organisation's seats. On Team and seat-based Enterprise plans, your usage draws on your seat's allowance. On usage-based Enterprise plans, usage is billed at API rates (Team and Enterprise help).An estimate at list price, unless your admin has set your organisation's rates. Usage inside a seat allowance isn't metered in dollars (cost guide).

A big token count isn't always expensive. Much of it can be cache reads: a sample session in Anthropic's cost guide shows 940,000 cache-read tokens next to 1,200 input tokens. As of October 2026, Sonnet 5.5's API price is $2 per million input tokens but $0.10 per million cache reads (pricing).

For budgeting API use, Anthropic's guide puts the average across enterprise deployments at around $13 per developer per active day and $150–250 per developer per month, as of October 2026 (cost guide). On a plan, what you can do varies with your conversations, model and features, "so there's no fixed message count" (pricing). To see what's left of your limits, read Claude Code usage limits.

Questions

Is the cost in Claude Code's /usage what I pay?

Not on Pro or Max, where Anthropic says it "isn't relevant for billing purposes". With an API key it's an estimate at list price, and the Usage page in the Claude Console has the billing figure (cost guide).

How much does Claude Code cost per month?

It comes with every paid plan, not Free. As of October 2026, Pro is $20 a month ($17 a month billed yearly) and Max is $100 or $200 a month (pricing, Max plan). With an API key you pay per token instead; as of October 2026, Anthropic's enterprise average is $150–250 per developer per month (cost guide).

Does /usage count claude.ai or my other computers?

The limit bars show your plan's limits, which Claude on the web, desktop and mobile share with Claude Code (pricing). The breakdown under them counts only this computer's sessions (cost guide), and so do ccusage and Layers.

How do I keep Claude Code history longer than 30 days?

Set cleanupPeriodDays in ~/.claude/settings.json to a larger number of days. It can't be 0 (settings reference).

{
  "cleanupPeriodDays": 90
}

The transcripts are plain text, so a longer history leaves more of what Claude's tools read on your disk (.claude directory docs).

Sources

I checked every source below on 23 October 2026.

Try Layers. It's free.

Install in VS Code

Or open VS Code, press ⌘P (Ctrl+P on Windows and Linux), paste it and press Enter.

Or get it from the VS Code Marketplace.