Workflow

runs()

workflow.runs() → Promise<WorkflowRun[]>

The run history of this workflow, each one a full WorkflowRun you can refresh, resume or retry.

GET /api/workflows/:id/runsfreeWorkflowRun objects
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const runs = await workflow.runs();

for (const run of runs) {
  console.log(run.id, run.data.status, run.data.startedAt);
}

const waiting = runs.filter((r) => r.data.status === "waiting");
runs = workflow.runs()

for run in runs:
    print(run.id, run.data["status"], run.data.get("startedAt"))

waiting = [r for r in runs if r.data["status"] == "waiting"]

The statuses

statusMeans
runningIn progress.
waitingStopped at a human step. Nothing moves until it is resumed.
succeededFinished.
failedA step failed.
cancelledCancelled.

Finding what needs a person

for (const run of await workflow.runs()) {
  if (run.data.status !== "waiting") continue;
  const step = run.data.steps.find((s) => s.status === "waiting");
  console.log(run.id, step.id, step.config?.title);
}
for run in workflow.runs():
    if run.data["status"] != "waiting":
        continue
    step = next(s for s in run.data["steps"] if s["status"] == "waiting")
    print(run.id, step["id"], (step.get("config") or {}).get("title"))
A waiting run waits indefinitely

There is no timeout on a human step. That is deliberate — an approval that expired on its own would let a chain stall with nobody told. Listing the waiting runs is how an interface builds an inbox.

Deleting a workflow leaves its runs

The history is kept. Reach a run by its identifier with getRun() even after the workflow is gone.