# Reading a run (/docs/reading-a-run)

The seven MCP tools your coding agent reads with, the order the server hands it, what the viewer shows, and how to hand a run to someone else.

A recorded run is read two ways: by your coding agent over MCP, and by you in the local viewer. Both read the same store through the same Query API, so nothing one of them shows is hidden from the other.

## Ask your coding agent [#ask-your-coding-agent]

The MCP server is read-only and carries seven tools, which mirror the Query API one-to-one:

| Tool | What it answers |
|---|---|
| `list_sessions` | which run; always bounded by status, a time window, or text, and every answer carries the store's totals so an empty page is never mistaken for an empty store |
| `get_session` | what happened in that run: one compact timeline, a line per step with its type, name, status, duration, and payload size |
| `get_event_payload` | exactly what one step saw or returned, by sequence number; bodies are capped and truncation is labelled, with the total size, so the agent raises the cap only for the step that matters |
| `search_sessions` | did this string appear anywhere, across names and payloads |
| `export_session` | the run as a session file, to hand over |
| `reads_summary` | how much has been read from this store, by which client, in how many bytes |
| `sessionist_info` | whether Sessionist itself is healthy: reader and recorder versions, store path and counts, the login service |

On connect, the server hands the agent its own reading order as its instructions, so there is nothing to install to read. The typical question takes three or four calls: one list, one timeline, then only the one or two payloads the answer hinges on. The agent is told not to list again to survey the store and not to read every payload in a run.

Every tool response is counted by size in a local reads table, never by content. The viewer shows it as an odometer of how much your coding agents have read, and `reads_summary` exposes the same numbers over MCP.

For Claude Code, `sessionist setup` registers the server. For any other MCP client, `sessionist setup --print` emits the config block.

## Or look yourself [#or-look-yourself]

The run you weren't watching, step by step, with the exact bytes: the same recording your coding agent reads. The viewer at `127.0.0.1:4319` shows:

- **Timeline.** Scrub the run, jump to errors.
- **Step inspector.** The exact input and output of any step, however large.
- **Context diff.** What the model's context gained, lost, or truncated since the last call.
- **Live.** Sessions append as the agent runs.
- **Deep links.** Any session, any step.
- **Honest badges.** Partial capture says so on its face.

What you will not see: an invented value. If a field was not in the telemetry it is absent, not defaulted. Unrecognised telemetry is kept verbatim as a plain step and labelled as such. A session grouped without a conversation id is labelled as grouped by an idle gap, so the grouping is read as approximate. Nothing can be edited.

## Hand it over as a file [#hand-it-over-as-a-file]

`sessionist export <id>` writes a plain `.session.jsonl` file that any agent reads without a server. The format is public and versioned, with a byte-equal round trip, so your data is yours in a format you can read with `cat`. `sessionist import <file>` brings a file into a store, on this machine or someone else's, where the viewer and a coding agent read it like any other run.