Stats
What it shows
Section titled “What it shows”The Stats tab analyses one thread: what it cost, how the cache behaved, which parts of the conversation were expensive, and which tools did the most. Every figure comes from pi’s own session file, so a thread from last month gives the same answer as one from a minute ago.
While a run is in progress, a dashed line at the top says which turn is running, for how long, and how much output it has streamed so far (turn 3 in progress · 7m 12s · output ≈4.5K tokens so far (~18K chars)). Those figures are estimates, and the turn is not added to any total, chart or ranking until it completes and the provider has counted it. A thread with no completed turn yet says the first response is still running instead of what the charts wait for.
How to open it
Section titled “How to open it”- Open a thread from the rail, then choose the Stats tab at the top of the thread.
- A point on a chart, a call or a prompt in a list opens that spot in the chat.
What it looks like
Section titled “What it looks like”
- failures, and under it the error results that are not failures, counted apart:
1 exited non-zero · 2 refused by Enso guard — not failures. - Tokens: each turn’s cache read, cache write, cache miss and output, as a stacked bar.
- Cost per turn, with the median beside the title.
- Costliest calls: the tool calls ranked by input, output, time or failures.
Further down: Cumulative usage by tool, Distribution, Costliest prompts and Latency, then the thread’s Session eval.
What to look for
Section titled “What to look for”The thread above cost $0.1671. Three things stand out.
The first turn after the switch to claude-opus-4-1 is one solid cache-write bar in Tokens, and the peak of Cost per turn: the new model had no cache, so the whole prefix was written again, at that model’s price. Nearly every other turn is almost all cache read. If you see a lone cache-write bar in a thread of your own, look for a model switch or a compaction just before it. Context Events names which.
The line under the metrics, $0.0302 not attributed to a turn on this branch, is the compaction. Its summary was a model call of its own, but not a turn of the conversation, so the tab names the cost instead of hiding it in a turn.
failures reads 0 · 0%, counting neither the refusals nor the commands that exited non-zero. pi records a guard’s refusal and a command’s non-zero exit as errors, just like a call that broke. Enso keeps a record of each refusal and of who made it, and reads the exit code pi appends to a command’s output, so the tab counts the refused calls and the cat of a missing file apart, under the figure. A refusal is the guard working, and a non-zero exit is the command answering (grep finding nothing exits 1): neither is the tool breaking. A command that timed out, a call that was aborted, and an error from any other tool are failures.
What it doesn’t do
Section titled “What it doesn’t do”- It covers the current branch only. Cost spent on a branch you forked away from, or on a compaction, is named as not attributed to a turn, rather than spread over the ones you see.
- Times come from the log, which keeps 14 days. An older thread still has every token and cost figure, but its Latency says no day file covers it.
- Tool figures are in characters, not tokens. A tool’s cost is the tokens its result adds to later requests, which the Context tab shows.
- It has no price for a model pi has none for, such as the Codex models a ChatGPT login offers. Their tokens are counted as usual, but the cost reads
unknownrather than $0.0000. If only part of a thread ran on such a model, the total reads≥what the priced part cost, and the line under it counts the model calls it leaves out.
Go deeper
Section titled “Go deeper”- Context: the same requests, by what they were made of.
- Guards and receipts: what a refusal is.
- Observation seam: where the numbers come from.
- Logging seam: where the times come from.
- Prompt cache architecture.
