Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Outcome rules

Outcome rules classify raw node results into labels. The engine uses the first matching label, then transitions via the state’s on: map.

Structure

outcome:
  success:
    - exit_code: 0
  failure:
    - exit_code: {neq: 0}
  partial:
    - exit_code: 0

Each label maps to a list of predicates. All predicates in a clause must match (AND). The first matching label wins.

Predicates

PredicateExampleMatches when
exit_code0Exit code equals integer
exit_code{neq: 0}Exit code not equal
timeouttrueSubprocess timed out
signalfix_completeNamed signal is truthy in result
jq'.status == "ok"'JSON field matches (LLM output)

Labels and status

LabelInternal statusTypical use
success:successContinue happy path
failure:failureError or fix loop
partial:partialRecoverable incomplete work
retry:failureExplicit retry transition key

If no label matches, the outcome is unknown and the run may error.

Try it: Run a CLI node with a failing command and confirm the failure transition fires.