> 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.

# Run Commands

> List command records produced during a run.

Run commands are platform command records. They capture hosted invocation steps, SDK command execution, errors, timing, progress, and artifact counts.

Start from the runtime and get the active run.

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

## List commands

```ts
const { commands, nextCursor } = await run.commands.list({
  status: ["running", "succeeded", "failed"],
  limit: 50,
});

for (const command of commands) {
  console.log(command.sequenceNo, command.entryCall, command.status);
}
```

Include heavier fields only when needed.

```ts
const { commands } = await run.commands.list({
  include: ["request", "result", "error"],
});
```

## HTTP equivalent

```http
GET /v1/runs/{runId}/commands
```

## Related

* [Runs](/sdk/core-concepts/runs)
* [Run Events](/sdk/observability/run-events)
* [Invocations](/sdk/core-concepts/invocations)