Runs

View as Markdown

A run records what happened while a runtime was active. Events, commands, artifacts, live view, recordings, and activity belong to runs.

Use runs when you need to answer:

  • What did automation do?
  • What commands ran?
  • What files did it produce?
  • Can a human watch or take over?
  • What failed, and when?

Get the current run from a runtime

1const run = await runtime.currentRun();
2
3console.log(run.id);
4console.log(run.runtimeId);
5console.log(run.status);

runtime.currentRun() uses the runtime’s cached activeRunId, refreshes the runtime if needed, and falls back to listing active runtime runs. It throws runtime.no_active_run when no active run exists.

Run helpers

1await run.events.list();
2await run.events.wait({ timeoutMs: 30_000 });
3await run.commands.list();
4await run.artifacts.list();
5await run.live({ control: "none" });
6await run.recording();

What belongs on a run

SurfaceUse it for
EventsMachine-readable browser, runtime, connection, artifact, and lifecycle facts.
CommandsPlatform command records for hosted invocations and runtime actions.
ArtifactsScreenshots, downloads, recordings, reports, and collected files.
Live ViewWatch or control an active runtime.
RecordingReplay a run after or while it completes.
ActivityA human-readable timeline derived from run records.