What Claude Code costs, and how it is counted
Claude Code writes a transcript for every session. The AgentsTrack collector reads those files on your machine and turns them into cost per project, model and day, with the basis of every figure stated.
Where the numbers come from
- Transcripts under
~/.claude/projects/, one file per session, read and never written. Every profile directory that shares aprojects/folder is counted once. - Each assistant message carries its model and its usage. Claude Code repeats one message per content block; the collector counts it once.
- Tool calls come from the same transcript, so the tools a session used sit next to what it cost.
- Nothing hooks into Claude Code. The collector is a separate process reading files that already exist.
What is counted
- Input, output, cache creation and cache read tokens, each priced at its own rate.
- Thinking tokens are shown, but they are part of output, so they are never billed twice.
- A model with no rate entry reports zero rather than a guess.
Subscription or API cost
- Transcripts carry no plan. The collector reads your account's plan type from
~/.claude.json, so a Pro or Max subscriber sees SUBSCRIPTION: what the work would cost at API list rates, never an invoiced amount. - Without a plan on the account, for example with an API key, the figure is ESTIMATED at published list rates.
- See cost basis for what each label promises.
What leaves your machine
- Redaction runs on your machine before anything is queued for upload.
- In
metadatamode only counts, timings and identifiers travel: no prompt, no titles derived from prompts, and a shell command is reduced to its binary name. - The default
analyticsmode adds summaries derived on your machine. The prompt itself never travels unless you choosefull. - Your organization's setting is a ceiling, never a floor: it can narrow what you send, never widen it.
Read on
See what your Claude Code sessions cost
14 days of Pro, no card. Two commands, and your first session lands in the dashboard.