---
title: "Runs"
description: "Start workflow runs from tools and members, and list, read, and terminate them."
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Runs

A run is one execution of a workflow, pinned to the version that started it. This page covers how runs start and how members inspect and stop them.

## Workflow run starts

Any tool starts a workflow run by calling `ctx.workflows.start`: a tool called on a branch of the defining repo (`extensions call-extension-tool`), a tool called on an installation (`extensions call-extension-installation-tool` or MCP `tools["<repo slug>.<name>"].<repoId>.<tool>`), or a tool that a schedule, trigger, webhook, or mailbox runs:

```ts
const { runId, created } = await ctx.workflows.start(
  "syncVendorCatalog",
  { batchId: "2026-10" },
  { key: "batch-2026-10" },
);
```

- **Pinned version**: A run pins the registry version the starting tool ran, a branch's prerelease included, and reads the branch that tool read (`main` for an installation). A later commit, update, or uninstall never changes a run under way, and a run outlives its branch.
- **Idempotency `key`**: When you pass `{ key }`, starting a workflow with the same `key` as a prior run of that workflow on that branch returns the recorded `runId` with `created: false` instead of creating a duplicate run. Without `key`, every call creates a fresh run.

### Workflow run starts from a member

A member with `run` on the workflow ([Actions](https://buildrforge.com/docs/permissions/actions/#workflows)) can also start a run without a tool. The run acts as that member:

```sh
forge extensions create-extension-installation-workflow-run --repo "$OPS_REPO" \
  --name standards.vendor-standards \
  --data '{"workflow":"syncVendorCatalog","input":{"batchId":"2026-10"},"idempotency_key":"batch-2026-10"}'
```

- **Request**: `POST /repos/:repo_id/extension-installations/:name/workflow-runs` with the body `{ workflow, input, idempotency_key }`, where `idempotency_key` is optional and works as a tool's `key` does. For the version a branch of the defining repo publishes, use `POST /repos/:repo_id/branches/:branch/extensions/:name/workflow-runs` or `forge extensions create-branch-extension-workflow-run --branch`.
- **Which workflows**: `forge extensions list-extension-installation-workflows` and `forge extensions list-extension-workflows --branch` list the workflows that a version declares, with the JSON Schemas of each one's input, output, and signal payloads.

## Workflow run inspection and termination

Members with `readRuns` on the workflow (which the default Editor and Viewer policies grant) can list and inspect the workflow runs of an installation, or of an extension the repo defines on one of its branches, and members with `terminate` on the workflow can stop an active run:

```sh
# List workflow runs on main's installation (newest first, filterable by --status)
forge extensions list-extension-installation-workflow-runs --repo "$OPS_REPO" \
  --name standards.vendor-standards --status running

# Read a single workflow run
forge extensions get-extension-installation-workflow-run --repo "$OPS_REPO" \
  --name standards.vendor-standards --run "$RUN_ID"

# Terminate an active workflow run
forge extensions terminate-extension-installation-workflow-run --repo "$OPS_REPO" \
  --name standards.vendor-standards --run "$RUN_ID"

# The same for runs that the defining repo's tools started on a branch
forge extensions list-branch-extension-workflow-runs --repo "$STANDARDS_REPO" --branch draft \
  --name vendor-standards
forge extensions get-branch-extension-workflow-run --repo "$STANDARDS_REPO" --branch draft \
  --name vendor-standards --run "$RUN_ID"
forge extensions terminate-branch-extension-workflow-run --repo "$STANDARDS_REPO" --branch draft \
  --name vendor-standards --run "$RUN_ID"
```

Each `ExtensionWorkflowRun` moves through six statuses: `queued`, `running`, `waiting`, `complete` (with `output`), `errored` (with `failure`), and `terminated`. Calling `terminate` on a run that is already `complete`, `errored`, or `terminated` fails with `ExtensionWorkflowRunFinished`.

To see the automations of every repo you can read in an organization at once, run `forge extensions get-automation-health`, which calls `GET /orgs/:org_id/automation-health`. It lists the workflow runs that wait for a signal, how many more are queued or running, and the schedules and triggers on `main` whose latest finished run failed or was interrupted, each only where you have `readRuns` on it.

Source: https://buildrforge.com/docs/extensions/workflows/runs/index.mdx
