X-Ray and Cache Autopsy on Traza Cloud
The Context X-Ray and the Cache Autopsy are reads of what your project already stored: no setup beyond recording model calls with their content, which OpenLLMetry does by default and the Claude Code and Codex importers always do. The engine’s X-Ray guide explains every field.
X-Ray one call
A call is addressed by its trace and span ids. A run’s tape lists them:
curl -s https://api.trazadb.com/v1/tapes/sess-9c21 \
-H "Authorization: Bearer $TRAZA_API_KEY" | jq -c '.steps[] | {index, kind, trace_id, span_id}'
curl -s https://api.trazadb.com/v1/xray/$TRACE_ID/$SPAN_ID \
-H "Authorization: Bearer $TRAZA_API_KEY"
The answer is the context split into chunks — system, user, assistant, tool
calls, tool results, tool definitions — each with an estimated token count,
the step that introduced it (introduced_by), how many steps it has sat
there, and whether it is stale. composition sums the context by kind and by
source; dropped_since_previous and edited_since_previous say what the
conversation’s previous call had that this one does not, which is how a
compaction’s losses show; cache is this call’s autopsy verdict.
Autopsy a run
curl -s "https://api.trazadb.com/v1/cache/sess-9c21" \
-H "Authorization: Bearer $TRAZA_API_KEY" | jq .summary
One verdict per model call, in step order: stable, ttl_expired,
volatile_content, reordered, new_context or unknown, each with the
first chunk that changed and the bytes that changed in it. The summary groups
breaks by shape, costliest first, with fixed advice for each. The cache
lifetime assumed is 300 seconds, Anthropic’s default; pass ttl_seconds= (up
to a day) if your provider keeps entries longer or shorter.
est_tokens_lost is always reported. est_cost_lost_usd appears when the
pricing table of your project’s cell names the model’s input and cache-read
rates; otherwise the autopsy reports tokens and counts the break in
unpriced_breaks, so a total is never silently an undercount. Spans that
carry their own metered cost (llm.cost_usd) are not affected.
cache_read and reported_hit are the provider’s own report beside each
verdict; disagreements counts calls where the two contradict each other, and
disagreement_advice lists what to check.
Imported coding sessions
Claude Code and Codex transcripts record neither the system prompt nor the
tool definitions, so an X-Ray of an imported call shows the conversation, and
a stable verdict means the recorded part of the prefix held. Traza Cloud’s
Coding agents page autopsies the ten most expensive sessions in its window,
across the organization’s projects, and sums them into one cache figure — a
sample that says how many sessions it covers; see
Claude Code and Codex.
From your coding agent
The xray_step MCP tool returns a compact X-Ray — composition, the cache
verdict with its diff, what was dropped or edited, and a line per chunk —
inside the untrusted-telemetry frame. Connect it with a read key
(MCP).