Run Replay
Step through a recorded run: input, output and state at every event.
PROGet Run Replay and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Agent
- Access
- ProPro · unlocked
- Source
- 474 lines · one file
- States
- 7 drawn
- Added
- 12 Oct 2026
The decision inside it
Playing back and running again are different buttons
Playback moves through the record and is always safe. Running again executes steps for real and can repeat side effects, so it asks first, waits for your backend and never reports success itself.
When to use it
Use Run Replay to step through a recorded run event by event, with each step's input, output and state, attempts side by side, and replay or resume from a checkpoint.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Run Replay for this.
Install it: npx shadcn@latest add @liro/run-replay
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/run-replay.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { RunReplay, type RunEvent } from "@/components/ui/run-replay";
const events: RunEvent[] = [
{ id: "1", sequence: 1, type: "step_started", title: "Load contacts" },
{ id: "2", sequence: 2, type: "tool_call", title: "crm.list", status: "succeeded", output: { count: 120 }, checkpointId: "cp-2" },
{ id: "3", sequence: 3, type: "error", title: "crm.update", status: "failed", error: "429 Too Many Requests" },
];
export function Replay({ resume }: { resume: (checkpointId: string) => Promise<void> }) {
return <RunReplay runName="Contact sync" events={events} onResumeFromCheckpoint={resume} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
events | RunEvent[] | Yes | – |
runId | string | No | – |
runName | React.ReactNode | No | – |
attempts | RunAttempt[] | No | – |
attemptId | string | No | – |
onAttemptChange | (attemptId: string) => void | No | – |
selectedEventId | string | No | – |
defaultSelectedEventId | string | No | – |
onEventSelect | (event: RunEvent) => void | No | – |
onReplay | () => void | Promise<void> | No | Adds "Run again". Executes the run again on your backend: may repeat side effects. |
onResumeFromCheckpoint | (checkpointId: string, event: RunEvent) => void | Promise<void> | No | Adds "Resume from here" on events with a checkpoint. |
isActionPending | boolean | No | An action is in flight, if you track it yourself. |
actionError | React.ReactNode | No | An error from your side, shown under the controls. |
playSpeed | number | No | Milliseconds per event when playing. Default 900. |
look | Look | No | Layered sets it in a tray, the heading above the card and the status in the strip below. Flat is one card. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebadgebuttonselectstatetabsStates
All of them are drawn by the component. None is left for you to design.
- Event selected
- Playing back
- State changed
- Checkpoint
- Confirming
- Resume failed
- Attempt switched
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances