postrundocs Back to siteSign in
Browse docsReviewing sessions

Reviewing sessions

The review app is a local web page served by Postrun. It reads the store on your computer and shows what your agents did: a dashboard, every session, every project, and one session at a time with its changes, risks and your review. It updates live while agents are working.

Open it

postrun open

The review app runs at http://127.0.0.1:1234/ whenever Postrun is running, so you can also bookmark that address. postrun status shows the address if you changed the port with postrun setup --port.

The sidebar has four pages: Dashboard, Sessions, Projects and Settings. It stays in place while the page scrolls. Collapse at its foot, or the [ key, shrinks it to icons (hover one for its name); the choice is remembered, and you can also set it in Settings under Appearance. On a phone it becomes a bar across the top. The card at the bottom of the sidebar always says whether Postrun is recording:

CardMeaning
RecordingPostrun is running. A ring pulses each time something is written.
PausedRecording is paused from Settings. Claude Code events are dropped until you resume; Cline keeps its own history, which Postrun reads on resume. Restarting Postrun resumes.
Not runningThe page cannot reach Postrun. Run postrun start. What is on screen stays, and the app catches up when Postrun is back.
Not connectedThis browser does not have the key yet. Run postrun open. See Troubleshooting.

Dashboard

What your agents did today, in the last 7 days or in the last 30 days (your choice is remembered):

  • Sessions, Steps, Failed steps and Not reviewed, each with a small trend and a comparison with the period before. Click one to see those sessions.
  • Steps per day, stacked by kind. Hover a day for its numbers.
  • Running now: sessions an agent wrote to in the last few minutes.
  • Needs a look: sessions you have not reviewed yet, the ones with the most failures and flags first.
  • Most edited files across all projects.

The session list

Sessions lists sessions newest first, grouped by the day they started. Each session shows its title (the first line of the first prompt), the project folder, the agent, how many steps failed, how many risk flags it has, your review, the step count, the reported cost and the start time.

The strip

Every session has a strip: its steps in order, one bar per step, coloured by kind (command, edit, read, message, other). A failed step stands tall in red. A short session fills only part of the track, so the strip also shows how long the session was. Sessions with more than 64 steps are drawn in 64 slices; a slice shows the kind it holds most of, and turns red if any step in it failed.

Finding a session

  • Search matches the first prompt, the project path and the start of the session id. With three or more characters it also searches inside every step: commands, output, edits and messages. A session found that way shows the matching line under its title; click it to open that step. Press / to jump to the search box.
  • Agent tabs show one agent's sessions; the address becomes /sessions?agent=<kind>.
  • When: any time, today, the last 7 or 30 days, or your own dates.
  • Size: any, 10 or more steps, or 100 or more.
  • Review: any, not reviewed, looks good, or needs follow-up.
  • With failures shows only sessions where a step failed.
  • Flagged shows only sessions with a risk flag.
  • Empty sessions (sessions that started but recorded no steps, such as a claude you opened and closed) are hidden unless you turn them on. The toggle shows how many there are.

The summary under the title counts every session that matches, with their total cost. Clear filters resets everything except the agent tab and the empty-sessions choice.

List or grid

Switch between a compact list and a grid of cards with the List and Grid buttons. Your choice, and whether empty sessions are shown, are remembered in this browser.

Working on several sessions

Select turns on checkboxes. With sessions picked you can:

  • Mark as looks good, to review them all at once;
  • Export as zip, one redacted HTML report per session in a single file.

Long histories

The list loads 50 sessions at a time and fetches the next 50 as you scroll near the end, or when you click Show more. Filters and search run in the store, not in the page, so a filtered list stays quick however many sessions you have. A session that starts while the list is open slides in at the top.

Projects

Projects shows each folder your agents worked in, most recently active first, with its sessions, steps, failure rate, sessions not reviewed and risk flags. A project opens its own page with its numbers, its most changed files, and its session list with all the filters above.

The session view

A session opens at /session?id=<id>. The breadcrumb above it links back to Sessions and to the session's project.

Summary

The top card shows the agent, the title and version, a plain summary of what happened, the session's tape, and:

ItemWhat it is
costReported API cost and number of API requests
steps, turnsTotals for the session
failedSteps whose outcome is failed
reference-onlySteps whose content was not available inline
workspaceThe working directory; click it to open the project
branchThe git branch the folder was on when the session started
whenStart and end time, or open while the session has no end, plus the number of segments
ownerThe owner id and the machine it was captured on
tokensInput and output tokens

The plain summary is written from the session itself, with no model and nothing sent anywhere: how many files changed and commands ran, how long it took, which commands failed and whether the last one passed, and what was flagged.

The tape under the numbers is the session's strip at full resolution: one bar per step (very long sessions group a few steps per bar). Hover a bar to see the step, and click it to open that step in the timeline.

Copy as PR summary

Copy as PR summary copies Markdown for a pull request description: the title, the plain summary, the files changed, the commands run, the commits, anything worth checking, your review, and a one-line footer with the agent, branch, step count and cost. Paste it and edit as you like.

Your review

Mark a session Looks good or Needs follow-up, and add a note if you want (save it with the button or Cmd/Ctrl+Enter). Clear removes the review. Reviews are stored with the session on your computer, show in the session list and count on the dashboard. Deleting a session deletes its review.

Risk flags

Postrun flags steps worth a second look:

FlagWhen
Risky commandsrm -rf (deleting build output such as node_modules or dist is noted as routine), force pushes (--force, -f, --mirror, +branch; --force-with-lease is a warning), git reset --hard, git clean -f, a downloaded script run straight away (curl … | sh, bash <(curl …), sh -c "$(curl …)", piped to Python or Node too), sudo or doas, chmod 777, dropping a database or table from a SQL client, prisma migrate reset, dropdb, npm publish (not --dry-run), reading .env, SSH, cloud or Kubernetes credentials, printing the environment
Secrets in outputA command printed what looks like a key, token or password
Edits outside the projectA file was changed outside the session's working folder (temporary folders are fine)
Secrets filesA .env, .envrc, key, credentials or Terraform state file was read or changed

Commands are read the way a shell splits them, so text inside quotes is never mistaken for a command (echo 'use sudo' is not flagged), and commands inside $(…) are read too. Each flag names what matched and links to its step. Flags are worked out on your computer when a session is recorded, and the step itself lists them when you open it. When the rules improve, sessions already stored are checked again once.

Git

When the session started in a git repository, the panel shows the branch and every commit the agent made (read from the output of git commit). Click a commit to open the step that made it.

Timeline, Changes, Files and commands

Three tabs below the review panels.

Timeline groups steps by turn. Each turn shows its number, the prompt that started it, and its mode (for Cline, plan or act; otherwise no mode). Each step shows its seq, its type, a one-line summary, and a status:

  • ok
  • failed, followed by the error type when the agent reported one
  • reference-only, when the content is a pointer rather than inline

Click a step, or focus it and press Enter, to open everything it recorded:

StepWhat opens
commandThe command, its working directory and exit code, then stdout and stderr
editThe file and the change as a diff: removed lines in red, added lines in green
readThe file and the line range read
messageThe full prompt or reply
otherThe tool name and everything recorded for it

Each step also shows when it happened, the permission decision when one was recorded, and any error or flag. Output longer than 100,000 characters is cut, with a button to show all of it. Expand all and Collapse all sit next to the timeline heading. To link to one step, add #step-<seq> to the address: that step opens and scrolls into view. An open step stays open while the session updates live.

Changes shows every edit, file by file, with lines added and removed. Each file opens to its edits in order, each as a diff with three lines of context, and a link to its step. An edit that did not apply is dimmed. A very long edit is shortened here; open its step for all of it.

Files and commands lists every file the session created, edited or read (with how many of those steps failed), and every distinct command with how many times it ran and the exit codes seen. Commands whose output is not inline are tagged output not inline.

Long sessions stay quick to open and to watch:

  • The timeline shows the 30 most recent turns. Show earlier turns above them adds 50 at a time. A link to a step shows every turn.
  • The session arrives with each step's first 2 KB of output; opening a step loads the rest.
  • A live update fetches only the steps that changed since the last one, at most once every two seconds, and redraws only the turns that changed.

A Claude Code session recorded while Postrun was stopped shows not recorded for cost: see Troubleshooting.

Keyboard

Press ? on a session for this list.

KeyDoes
j / kNext / previous step
fNext failed step
eOpen or close the current step
gBack to the top
1 / 2 / 3Timeline, Changes, Files and commands
aMark as looks good
nMark as needs follow-up
cCopy as PR summary

Keys do nothing while you are typing in a box.

Settings

Everything in Settings applies to this computer only.

SectionWhat you can do
RecordingPause and resume recording; start Postrun when you log in (macOS and Linux with systemd)
AgentsSee whether Claude Code and Cline are found and set up; run setup again
Notifications and updatesA desktop notification when a running session fails three steps in a row (once per streak); a daily check for a newer Postrun
AppearanceSystem, dark or light theme, and an expanded or collapsed sidebar, remembered in this browser
StorageWhere sessions are stored and how much space they use; how long raw logs are kept (a day, a week, 30 days or until deleted); Save backup; Delete all data
Your usageHow often you use each feature, counted on this computer only and never sent: days active, sessions recorded, reviews, PR summaries, exports and searches, a 30-day activity strip, and Copy summary (the same text as postrun stats)
AboutYour version, and Run checks, the same checks as postrun doctor

Both notifications and the update check are off until you turn them on. Once a day the update check asks the npm registry for the latest version number, and a banner appears at the top when a newer one is out. Apart from that, Postrun only contacts the internet when you make a share link.

Save backup downloads one file with every session (a copy of the store). It is not redacted: keep it private. Delete all data removes every session and raw log after you type delete everything. New sessions are still recorded.

Settings is read-only when the review app runs from the development server (pnpm dev:core), because there is no background process to change.

At the bottom of the sidebar, Share links opens your links at app.postrun.app, and Feedback opens a short form: a rating from 1 to 5, what Postrun should do next, an optional email, and an optional usage summary (counts only). Exactly what will be sent shows every field before you press Send feedback. The background process passes it to app.postrun.app; nothing about your sessions goes with it.

After about a week of use, a banner asks once how Postrun is working for you. Not now hides it for two months.

Settings → Account shows whether this computer is signed in for share links. Connect account does the same as postrun login, without a terminal: approve the computer in the tab that opens, and the card updates by itself.

Live updates

The app keeps one connection per browser tab to the live events stream. When a session is written, the dashboard, the list and the open session refetch in place, and new steps get a short highlight.

A Claude Code session updates at the end of each assistant turn. A Cline session updates shortly after Cline saves its messages file.

Export

The Export report button on a session opens the export panel. It lists every value redaction will mask before you download. See Exporting and redaction.

Below the download, Share link uploads the same redacted report to app.postrun.app and gives you a link to copy. Choose how long it works (1, 7, 30 or 90 days) and click Create link. If this computer isn't signed in yet, the panel says to run postrun login first. See Share links.

Deleting a session

The Delete button on a session removes it from Postrun on this computer. A short panel asks you to confirm first, with Cancel selected, and says how many steps will go.

Deleting removes:

  • the session's steps, turns and summary from the store, with SQLite's secure delete on, so the content is overwritten rather than left in free pages, and the write-ahead log is cleared;
  • its raw capture files, for a Claude Code session.

Postrun then remembers only the session id, so the recorder will not record that session again, even if the agent keeps writing to it. Pushes for it get 410. Any other tab showing the session says it is no longer in Postrun.

Deleting does not touch the agent's own copy. Claude Code keeps its transcripts under ~/.claude/projects and Cline keeps tasks in ~/.cline/data/sessions; delete them there if you want them gone everywhere.

The same works from a terminal with postrun delete. The button is not shown in the demo.

Routes

The review app uses these routes, which you can also call from scripts on the same machine. Every route except /api/health needs this computer's key, from ~/.postrun/ingest-token, as Authorization: Bearer <key> (or ?key=<key> for downloads and the live stream). Without it the answer is 401. See Security.

RouteReturns
GET /api/sessions{ sessions, agents, total, total_cost, empty_count, next_cursor?, matches? }, newest first. Filters: agent, q (search; with 3 or more characters also inside steps, unless in_steps=0), from and to (dates or times; to is exclusive), min_steps, failed=1, empty=0, workspace (a project folder), verdict (none, approved or needs_attention), flagged=1. matches maps a session id to the first matching step (seq and a snippet). Paging: limit (1 to 500) and cursor (the previous page's next_cursor). Without limit, every match is returned. A bad value returns 400.
GET /api/sessions/<id>The full session (summary, segments, actors, turns, steps) plus report (files touched, commands run). 404 if not found.
GET /api/sessions/<id>/exportThe redacted HTML report, as a download.
GET /api/sessions/<id>/export/reviewWhat the export would mask, as JSON.
GET /api/dashboard?days=1Totals, per-day steps by kind, running sessions, sessions that need a look and most edited files. days is 1, 7, 30 or 90.
GET /api/projects{ projects }: each working folder with its session, step, failure, review and flag counts.
GET /api/projects/files?root=<folder>The folder's most edited and read files.
GET /api/export?ids=<id>,<id>Several redacted HTML reports in one zip.
GET /api/statusWhether Postrun is recording, which agents are set up, storage use, settings and the update check.
GET /api/doctorThe postrun doctor checks as JSON.
GET /api/backupA copy of the store, as a download.
GET /api/usageLocal usage counts, and the same summary as plain text (text).
GET /api/account{ signed_in, email?, server }: whether this computer can make share links.
POST /api/sessions/<id>/shareBody { expires_days } (1, 7, 30 or 90). Uploads the redacted report and returns { url, title, expires_at, masked, home_paths }. 409 with code: "not_signed_in" when this computer isn't signed in. Same origin only.
GET /api/eventsThe live events stream.
DELETE /api/sessions/<id>Deletes the session (see above).
PUT /api/sessions/<id>/verdict{ state, note? } with state approved, needs_attention or null to clear.
PUT /api/settingsChanges settings: autostart, raw_log_hours, notify_failures, update_check.
POST /api/recording{ paused } pauses or resumes recording.
POST /api/setupRuns setup again.
POST /api/data/delete{ confirm: "delete everything" } deletes every session.
POST /api/usage{ event } counts one use the page alone can see: app_opened, session_viewed, pr_summary_copied, changes_viewed or keyboard_used. Anything else is refused.

Routes that change something are only accepted from the review app itself: requests from another site get 403, and a body must be JSON. status, doctor, backup, settings, recording, setup and data/delete need the background process, so they return 501 from the development server.

Every response carries x-content-type-options: nosniff, referrer-policy: no-referrer and cache-control: no-store, and no CORS headers.

Working on the review app

To run the app with hot reload, start the core server and the Next dev server in two terminals:

pnpm dev:core    # API and the last built UI on 127.0.0.1:1234
pnpm dev:ui      # Next dev server on 127.0.0.1:3000, with /api proxied to 127.0.0.1:1234

Set UI_PORT to move the dev server, and POSTRUN_CORE_URL to proxy to a core server on another address.

pnpm dev:core prints the app's link with its key. Open http://127.0.0.1:3000/#key=<the same key> once to connect the dev server's page too; a browser keeps a key per address and port.