Blog

How to check Claude Code token usage per session, project and developer

For the session you are in, run /context to see what fills the window, /cost for tokens and cost on an API key, and /status for plan usage. Per project, read the local session logs with a tracker. Per developer, export OpenTelemetry metrics or use a dashboard on the request path.

67.7%
of spend is cache reads of old context
13.2%
is output
72%
under baseline on a real session through condense

What the numbers mean

Each request has four counts: input, output, cache writes and cache reads. Caching makes re-sent input cheaper, not free, and expires after about five idle minutes.

Per session: built-in commands

Run /context in a fresh session before typing: that is your fixed overhead on every request. See MCP servers and CLAUDE.md overhead to cut it.

CommandWhat it showsBest for
/contextHow full the context window is, by categorySpotting heavy MCP servers, big CLAUDE.md, bloated history
/costSession tokens and costAPI key users
/statusAccount, model and plan usagePro and Max subscribers

A custom status line script receives session data as JSON, so it can print context size or cost on every prompt.

Per project and per developer

Local trackers read ~/.claude/projects and group by day, session or project. Teams need numbers they did not collect from each laptop.

RouteScopeTrade-off
Local log trackerOne machine, per projectList-price estimates; transcripts get cleaned up
Anthropic ConsolePer API key and workspaceRough split; one key per developer
OpenTelemetry exportPer session and userMost flexible, most setup
condense dashboardPer person, model, projectOn the request path; no laptop setup beyond dense claude

Report cost per finished task next to tokens. See LLM gateway vs proxy and cost per developer.

Reading the report

Review weekly, not daily. These patterns are the ones worth acting on.

  • Cache reads dwarf everything. Normal. Watch how fast they grow per turn.
  • Cache write spikes mid-session. The cache expired after a break. Clear before a break instead.
  • One session dominates the day. Split it with /clear and a short handoff.
  • High Opus share on routine work. Default to Sonnet, plan with Opus.
  • Big input on short sessions. The weight is CLAUDE.md, memory and MCP tool definitions.

Usage and savings with condense

condense compresses context on the request path, so it sees every request. Run Claude Code through it with dense claude.

ReportWhat it shows
dense infoTokens before and after, money saved, current session. Also /dense:info.
dense usageClaude plan usage next to what it would have been without condense.
condense dashboardSpend by person, model or project, alerts, CSV exports, budgets.

Frequently asked questions

How do I see how many tokens Claude Code used in a session?

Run /cost for the session's tokens and cost on an API key. Run /context to see which parts fill the window.

How do I see Claude Code usage on a Pro or Max plan?

Run /status to see plan usage and when it resets. On a subscription the plan limit is what stops you.

Where does Claude Code store usage data?

In JSONL transcripts under ~/.claude/projects, one folder per project. Each assistant message records its token counts.

Is there a Claude Code usage dashboard for teams?

Anthropic's Console shows usage by key and workspace. For per-developer detail, export OpenTelemetry metrics or use a proxy with a team dashboard.

Why is my token count so much higher than what I typed?

Every turn re-sends the system prompt, CLAUDE.md, tool definitions, history and tool output. What you typed is a tiny share.

All posts