Track your Claude Code Usage
Or Codex, OpenCode, Copilot, Cursor and Pi. Capture full trace history to improve your flow, and track how much you're spending in tokens.
Input I did the gcloud auth login hopefully you can continue?
Output The scan came back empty: **no project in your account has the Google Ads API enabled at all**, which actually pins the diagnosis. Modern Ads API accounts declare their Cloud project explicitly in th…
Input I have several design change requests here [Image #7]
Output All three are in: clawd is a die-cut sticker on the right with the slow wobble, the trace colors match the app tokens, and the span tree groups repeats with ×N pills…
Input ok merged! but /reuse-worktree cuz already found a bug
Output Worktree reset to latest main on a fresh branch. The bug reproduces: the retry queue drops the last event when the worker restarts. Writing the failing test first, fix goes on the same PR…
Input awesome, this is merged, but apply gave those errors:
Output Both errors share one root cause: the migration runs before the enum exists. Reordered the migrations, apply is clean, and the seed passes on a fresh database…
Input can you get rid of all those stale artifacts? clean them up, maybe commit first…
Output Committed the WIP first, then removed 14 stale artifacts: 9 orphaned preview deploys, 3 dangling worktrees, 2 cache volumes. 4.2GB freed, nothing CI references…
Input nah why would we keep it in the cluster? why not just ignore it? it was done on…
Output Right, dropped it from the cluster and added it to the ignore list instead. The sync job no longer touches it and the drift alert that kept firing is gone…
{
"command": "gcloud services list --enabled | grep -i googleads",
"description": "Check which projects have the Ads API enabled"
}Span attributes
Features
Everything a session leaves behind, in the platform's own UI.
Cache hit tracking
Cache reads and writes are separate token classes on every span, down to the 5m and 1h TTL split on writes.
Token accountingTheoretical vs billed costs
Exact cost numbers, straight from the API response. See how much you would be spending if you weren’t on an individual or team plan.
Open cost analyticsTools, skills, MCP
Every Bash command, file edit, skill invocation, and MCP call is a span with a duration. ×37 repeated unfolds into each one.
Trace tool callsClaude Code can query it back
The MCP server exposes your traces to the agent itself: it inspects last week’s runs, finds where tokens go, and edits its own workflow.
LangWatch MCPPlot any analytics
Any metric on the trace can go on a chart: sessions running in parallel, cost per session, idle time while it waits on your reply.
Build a graphInsights to improve your skills
Run Claude over your own trace history: what you asked for, what helped most, and the friction patterns where sessions go wrong.
Analyze your sessionsQuestions
How do I track my Claude Code usage?
Run npx langwatch claude. It configures Claude Code’s native OpenTelemetry export to LangWatch. Every session lands as a trace: model turns, tool calls, tokens by class, and theoretical cost. ccusage-style local log readers see one machine; the OpenTelemetry route follows you across machines and survives local log cleanup.
Does it work with Codex, OpenCode, Copilot, Cursor, and Pi?
Yes. Each agent exports through the same OTLP endpoint, so everything lands in one store with the same token, cost, and trace treatment.
What does the "Bundled" cost label mean?
Sessions on a Claude subscription (Pro, Max, Team) have no per-token invoice. LangWatch marks those sessions Bundled and computes a theoretical total at API list prices, per token class. That is the number behind "what would this have cost on the API".
Are cached tokens counted?
Cache read and cache write are separate token classes on every span, priced at their own rates. In long agent sessions cache reads are most of the volume, so a tracker that lumps them into input gets both the total and the cost wrong.
What if I accidentally paste any secret keys on my Claude session?
API secrets are automatically redacted and never stored on the LangWatch side. PII is redacted the same way, so personal information does not end up in the trace. For tighter control, enterprise policies and self-hosted setups are available.
One command, then keep working.
Free for individual use. Setup docs