Skip to contentSkip to page list

Docs

Coding Agent Sessions and Terminal Replay

Every coding-agent session on one list, with the context it carried, what it cost, the pull requests it drove, and a terminal replay of the whole conversation.

On this page

A session is one run of a coding agent: everything between starting Claude Code, Codex or another assistant and closing it, shown as one row. Open Sessions on your personal page at /coding-agents/sessions, or in the sidebar of any project that receives coding-agent telemetry.

Sessions list

The sessions list. The Context and Compactions columns show which sessions ran heavy; the Pull requests column shows what each session shipped, and a dash means the branch has no pull request yet.

The sessions list

One row per session, over the last 90 days. Every column sorts; a third click on the same column resets the sort.

ColumnWhat it shows
SessionThe session's title, lifted from the agent's own generated conversation title.
AgentWhich assistant ran it: Claude Code, Codex, GitHub Copilot, Gemini CLI, OpenCode.
Last updateWhen the session last did anything.
ContextPeak context: the most tokens the session carried into a single model call.
CompactionsHow many times the agent compacted its conversation to fit the context window, and under it, how many times it rebuilt the prompt cache.
Active and waitingHow long the agent worked, next to how long it sat waiting for you.
Token costWhat the session cost, cache-aware: tokens read from cache are priced as cache reads, not as fresh input.
Pull requestsThe pull requests the session's branches map to.

Search matches session titles. The period selector starts unset and reads All time, which means the whole 90-day window above rather than every session you ever ran. Pick a range when you look for a specific day.

Session detail

Click a row to open the session. The Usage tab opens on the totals: cost, model calls, tools run and files touched. Under them sit the signals worth knowing before you read any number, for example that the conversation was compacted, that an action was declined, or that the approval mode changed part way through.

The Cache health section is where the money goes:

StatWhat it tells you
Peak contextThe largest context the session carried, as a share of the model's window, banded against the current reliability guidance for long-context sessions.
Cache missesModel calls that wrote 1,000 tokens or more to the cache, and at least half as many as the call before them held in it (that call's cache read plus its cache write). A session's first call is never a miss. A cache write costs more per token than a read, so each miss pays twice for the same tokens.
Context reusedTokens served from the prompt cache across the session. These bill at a fraction of fresh input.
Context rebuiltTokens spent writing the cache again, summed across the session.

The detail also shows the biggest single rebuild: how many tokens one model call re-sent instead of reusing from cache.

Session detail

Session detail with the Cache health section. This session compacted twice, missed its cache three times, and re-sent 393k tokens on its biggest rebuild.

Below Cache health, Where the tokens went plots one bar per model call, split into the part served from cache and the part paid fresh. A session that caches well shows a thin dark band on each bar after the first. A tall dark band part way through the run marks the call where the cache was rebuilt, and the bar number tells you which call to look at in the replay.

The same tab also lists the tools the session used, in order, the time split between thinking, running tools and waiting for you, and the result in lines changed and edits accepted.

Session token usage

The token composition of one session. Call 1 pays for the whole context; every call after it reads most of the context back from cache.

To turn these numbers into a decision, run the context sweet spot investigation on your own sessions.

Terminal replay

The Terminal tab replays the session moment by moment, the way it looked in the terminal: your prompts, the agent's replies, every tool run with its output, and file changes as syntax-highlighted diffs.

Terminal replay

The terminal replay. Each tool run carries the time it took, and a file edit renders as the diff the agent applied.

Two details keep the replay faithful:

  • A notification injected into the session by tooling renders as a note, never as something you said.
  • A tool call the agent was denied stays in the replay, marked as denied.

LangWatch puts the view you choose in the address bar, so a link you share opens on the same view for the reader, subject to their content permissions.

Read sessions from outside the UI

The same data answers over the command line and the API:

example.shBash
langwatch session events <sessionId>   # model calls, compactions, rate limits, tool runs, in time orderlangwatch trace transcript <traceId>   # the conversation of one trace

For programs, GET /api/coding-agent/sessions/{sessionId}/events returns the per-call rows. See the coding agents API reference.

Also check: Usage analytics for the rollups across sessions, and Privacy for who can open a session's content.

Documentation