Observability and cost tracking for Claude Code

See every Claude Code session, tool call, and token as it happens. ClawMetry reads the transcript JSONL Claude Code already writes to ~/.claude/projects and renders sessions, tokens, cost, and sub-agent trees in one dashboard. No SDK. No wrapper around your API key.

3rd most-observed runtime Reads ~/.claude/projects JSONL Cache-aware cost tracking Sub-agent trees

What ClawMetry sees on Claude Code

Claude Code writes one JSONL file per session under ~/.claude/projects/<workspace>/<session-uuid>.jsonl. Every user message, assistant turn, tool call (Bash, Read, Edit, Write, WebFetch, Task, TodoCreate), tool result, thinking block, and per-turn usage counter is in there. ClawMetry's Claude Code adapter reads those files in read-only mode and surfaces:

Source: the adapter is at clawmetry_pro/adapters/claude_code.py. Every JSONL parse rule + the exact usage-shape normalisation (Anthropic API vs Pro OAuth vs Max subscription) is in that file.

Enable it in about two minutes

1. Install ClawMetry

Pick the line that matches your OS. Windows users: paste the install.cmd line, not the shell one.

# macOS or Linux
curl -fsSL https://clawmetry.com/install.sh | bash
# Windows (cmd.exe or PowerShell)
curl -fsSL https://clawmetry.com/install.cmd -o install.cmd && install.cmd

2. Run the daemon

clawmetry

The daemon auto-detects ~/.claude/projects and starts reading Claude Code transcripts immediately. No env var, no config, no runtime restart.

3. Open the dashboard

Open http://localhost:8900. Switch the runtime chip to Claude Code.

Start the free trial →

Works with Anthropic API, Claude Pro, and Claude Max

ClawMetry reads the transcripts Claude Code writes regardless of how it authenticates: Anthropic API key, Claude Pro OAuth, or Claude Max subscription. Turns billed against a subscription (rather than API) are labelled correctly on the Cost tab so you see cost coverage rather than a false zero.

Cache hit rate: the single biggest cost lever

For long-system-prompt sessions (most Claude Code workflows have a 3000-6000 token system prompt), Anthropic prompt caching saves about 90 percent of input cost on cache hits. ClawMetry surfaces cache-read vs uncached-input tokens per call, so you can:

See the caching and reuse guide (in the pipeline) for the tactics themselves; ClawMetry shows you which ones are actually working.

Sub-agent trees the Task tool creates

Claude Code's Task tool spawns sub-agents that run their own turn tree, and their tokens land on the parent session's bill. ClawMetry shows the parent turn with each sub-agent as a nested tree, per-sub-agent token totals, and the tool calls each one made. A parent that spawns 4 Task sub-agents that each burn 20k tokens is now a single visible number (80k) instead of five separate mysteries.

What each tab shows for Claude Code

TabWhat it showsScope
SessionsEvery Claude Code session, sorted by last activity, with workspace, model, and token totalsAll workspaces, or one
BrainLive entries as they land: user messages, tool calls, sub-agent spawns, thinkingWhole node, or one session
CostPer-session, per-model, per-hour token spend; cache-read vs uncached-input splitRuntime = claude_code, or all
Sub-agentsTask tool spawn tree with per-sub-agent tokens and toolsPer session
ApprovalsPause + kill switch for token-maxing sessions and risky tool callsRuntime-filtered

How this compares to Claude Code's own view

Claude Code shows current session state and per-turn tokens inside the CLI. What it does not show is cost per hour across sessions and workspaces, cache hit rate per model, sub-agent token attribution rolled up under the parent, or a kill switch when a Task sub-agent is token-maxing. Those are the things a team running Claude Code on a real budget needs on day one; they are what ClawMetry adds. See the cost-per-hour visibility page and the token-maxing page for how these work end to end.

All 19 runtimes ClawMetry observes

Claude Code is one of 19. Free on every plan: OpenClaw, NVIDIA NemoClaw. Paid on Cloud Pro or Self-Hosted Pro: the rest.

OpenClaw NVIDIA NemoClaw NanoClaw PicoClaw Claude Code (this page) Codex Cursor Aider Goose opencode Qwen Code Hermes Pi Deep Agents n8n Antigravity GitHub Copilot Grok QM