How to check Claude Code token usage: 4 ways to see what your agents spend
Four ways to check Claude Code token usage: the /cost command, the session transcripts, the ccusage CLI, and a live per-session meter. See exactly what each agent spends.
If you run Claude Code for more than a few minutes a day, tokens are your real currency. They decide when you hit a rate limit, how fast you burn through a subscription, and whether a long agent run was worth it. The problem is that Claude Code does not shout the number at you. You have to go and look.
Here are four ways to check Claude Code token usage, from the quickest built-in command to a live meter that shows every agent in real time. Pick the one that fits how deep you need to go.
1. The fastest way: the /cost command
Inside any Claude Code session, type:
/cost
Claude Code prints the total cost and token count for the current session, plus how long it has been running. It is the fastest answer to "what has this session spent so far", and it needs nothing installed.
The catch: /cost is scoped to the session you are in. It does not tell you what you spent yesterday, what a different project cost, or how a specific agent compares to another. For a single quick check it is perfect. For anything historical, keep reading.
2. Read the source: the session transcripts
Claude Code writes every session to disk as a JSONL transcript. On macOS and Linux you will find them here:
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl
Each line is one message, and the assistant messages carry a usage object with the exact counts: input_tokens, output_tokens, and the cache fields (cache_creation_input_tokens, cache_read_input_tokens). Cache reads are the interesting part: they are much cheaper than fresh input, so a session with a high cache hit rate costs far less than the raw token count suggests.
This is the ground truth. Every other tool, including the two below, reads these same files. If you want to script your own report, jq over the JSONL will get you there.
3. A dedicated CLI: ccusage
If you would rather not write your own parser, the community ccusage tool reads those transcripts and rolls them up into daily, monthly, and per-session totals:
npx ccusage@latest
It is a good middle ground: more history than /cost, less work than hand-rolling jq. It stays in the terminal, though, so it answers "what did I spend" but not "which agent, right now, is spending it".
4. A live meter: per-session usage in AgentsRoom
The three methods above all share one blind spot: they are after-the-fact and single-stream. The moment you run several agents in parallel, you want to see usage per agent, live, without typing a command in each terminal.
That is what the Claude Code token usage meter in AgentsRoom does. It reads the same JSONL transcripts, per session, and surfaces:
- input, output and cache tokens per agent, updating as the session runs
- the cache hit rate, so you can see when context is being reused instead of re-sent
- a warning before a session drifts toward a rate limit
Because it attributes usage by session, it stays correct even when you run multiple Claude Code accounts side by side: each account keeps its own totals, which makes per-client rebilling straightforward.
Which one should you use
- Just need this session's number?
/cost. - Want to script a custom report? Read the JSONL transcripts directly.
- Want daily and monthly totals in the terminal?
ccusage. - Running several agents and want to watch usage live, per agent and per account? Use the meter in AgentsRoom.
Checking usage is step one. If the numbers make you wince, the next move is bringing them down: see how to reduce Claude Code token costs for the levers that actually matter, starting with cache reuse.
Download AgentsRoom
Run your AI agents (Claude, Codex, Antigravity CLI, OpenCode, Aider, Grok Build, Mistral Vibe, Kimi Code) on all your projects, from a single window.
Companion app: monitor your agents on the go
Bring your own: Claude, Codex, Antigravity CLI, or other AI provider.
Push bugs and requests straight to your public backlog.
A glimpse of AgentsRoom in action.
Keep reading
How to Cut Your Claude Code Token Costs Without Slowing Down
Claude Code bills you per token, and most of the spend is invisible: bloated context, the wrong model, raw PDFs, agents re-reading the same files. Here is where the money actually goes and how to cut it, with the habits and tools that keep your bill low without slowing you down.
Read the articleConvert PDF to Markdown to Save LLM Tokens: The MarkItDown Guide
Feeding PDFs straight to Claude or any LLM quietly burns tokens: every page is also turned into an image. Convert the file to Markdown first with MarkItDown, Microsoft's free open-source tool, and cut your token bill by up to 80%. Full guide with CLI, Python, and MCP setup.
Read the articleToo many terminals, too many AI agents: the cognitive debt slowing you down (and how to get out)
Juggling ten AI-agent terminals builds a cognitive, documentation and financial debt that costs you time and tokens. Here is how to take back control.
Read the article