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.
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
- gather: deterministic (no agent); shells
inspect <targetRunId> --format jsonandevents <targetRunId>, returningstate, the run-levelrunError,failingNodes, anypendingApprovalsit’s suspended on, the tail oflastEvents, anokflag (false when inspect could not be read), and a one-linesummary. - diagnose: an agent reads the evidence and names the most likely
rootCauseHypothesis, with supportingevidenceand aconfidencelevel. 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. - recommend: an agent proposes one
recommendedAction(fix|rewind|retry|escalate), thecommandto run next, and arationale. A run waiting on an approval is always escalated, never rewound or retried.