Rank spend, autopsy the cache, blame a line.
An imported session is a run like any other, so spend, the Cache Autopsy and Agent Blame work with nothing else set up.
Import the sessions already on your disk, and see what your coding agents spend and why.
Set up Traza for my Claude Code and Codex sessions, sending them to Traza Cloud.
1. Install the engine's Python package, which provides traza forward:
pip install "git+https://github.com/toshish/traza.git#subdirectory=sdk/python"
2. The importer speaks plain HTTP only, so in a terminal of its own start the forwarder and leave it running:
traza forward --listen 127.0.0.1:8089 --upstream https://api.trazadb.com
3. Install traza-server from https://github.com/toshish/traza/releases (the importer is part of the server binary).
4. With my Traza Cloud ingest key in TRAZA_INGEST_KEY, import the last 30 days:
traza-server import claude-code --since 30d --url http://127.0.0.1:8089 --token "$TRAZA_INGEST_KEY"
traza-server import codex --since 30d --url http://127.0.0.1:8089 --token "$TRAZA_INGEST_KEY"
5. Then keep following the sessions I run:
traza-server import claude-code --watch --url http://127.0.0.1:8089 --token "$TRAZA_INGEST_KEY"
Keep --url on the forwarder's http:// address, never the https:// gateway. Never print or commit the key. When each import finishes, show me the counts it printed. traza-server import claude-code --json | jq -c '{sessions, turns, tool_steps, spans_sent}'
{"sessions":2,
traza-server import codex --json | jq -c '{sessions, turns, tool_steps, spans_sent}'
{"sessions":2,
claude-codeclaude-opus-5-5$0.1063
Agentgeneral-purpose
claude-haiku-5-54 steps$0.0014
An imported session is a run like any other, so spend, the Cache Autopsy and Agent Blame work with nothing else set up.
73% Cache efficiency
src/cart.rs
self.items.iter().map(|item| item.price).sum()
Editstep 3claude-opus-5-5
“Add a total to the cart summary”
It reads ~/.claude/projects and ~/.codex/sessions where they
already are, and importing twice still keeps one copy of each span.
traza-server import claude-code --watch
traza-server import codex --watch On Traza Cloud, each developer imports with their own key; one page shows spend, detector findings and cache breaks in the ten most expensive sessions.
Import them, then ask which agent step wrote a line.