Skip to main content
triage-run is an archived example, not installed by init: copy it from examples/init-pack/ with its dependency closure, or ask create-workflow to build an equivalent. triage-run takes a single run id, pulls that run’s state and recent event log, diagnoses the most likely root cause, and recommends the next move: fix, rewind, retry, or escalate. Reach for it when a run fails or stalls: a grounded read and a concrete command beat eyeballing logs.
The input is targetRunId, not runId: the engine reserves input.runId for a run’s own id, so a workflow inspecting another run needs a distinct name.

Stages

  1. gather: deterministic (no agent); shells inspect <targetRunId> --format json and events <targetRunId>, returning state, the run-level runError, failingNodes, any pendingApprovals it’s suspended on, the tail of lastEvents, an ok flag (false when inspect could not be read), and a one-line summary.
  2. diagnose: an agent reads the evidence and names the most likely rootCauseHypothesis, with supporting evidence and a confidence level. Pending approvals are read as a stuck state, not a failure; recurring identical errors point at a persistent defect, one-off network resets at a transient one.
  3. recommend: an agent proposes one recommendedAction (fix | rewind | retry | escalate), the command to run next, and a rationale. A run waiting on an approval is always escalated, never rewound or retried.
Every stage is read-only: it never mutates the run, so the recommended command is yours to run.

Inputs

Monitor it