> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For full documentation content, see https://platform.bctrl.ai/llms-full.txt.

# Runs

> Runs are the durable observability record for runtime work.

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

```ts
const run = await runtime.currentRun();

console.log(run.id);
console.log(run.runtimeId);
console.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

```ts
await run.events.list();
await run.events.wait({ timeoutMs: 30_000 });
await run.commands.list();
await run.artifacts.list();
await run.live({ control: "none" });
await run.recording();
```

## What belongs on a run

| Surface   | Use it for                                                                    |
| --------- | ----------------------------------------------------------------------------- |
| Events    | Machine-readable browser, runtime, connection, artifact, and lifecycle facts. |
| Commands  | Platform command records for hosted invocations and runtime actions.          |
| Artifacts | Screenshots, downloads, recordings, reports, and collected files.             |
| Live View | Watch or control an active runtime.                                           |
| Recording | Replay a run after or while it completes.                                     |
| Activity  | A human-readable timeline derived from run records.                           |

## Related

* [Run Events](/sdk/observability/run-events)
* [Run Commands](/sdk/observability/run-commands)
* [Run Artifacts](/sdk/observability/run-artifacts)
* [Live View](/sdk/observability/live-view)
* [Recording](/sdk/observability/recording)