Skip to content
02 Workflows and Agents

Human-in-the-loop as a workflow primitive

The part most teams get structurally wrong. Two of the four steps are ordered for correctness.

Lesson 05 of 06 · 10 min

A durable wait is four things, and the ordering of two of them is a correctness requirement rather than a style preference.

  1. Mint a handle identifying this specific pause in this specific execution.
  2. Persist the pause so it survives the process.
  3. Notify the human, carrying the handle, as a step so it is retried if it fails and not repeated if it succeeded.
  4. Race the wait against a durable timer so "no response" is a modelled outcome rather than a hang.
Predict

Why must minting the handle come before notifying the human?

The rest of this lesson unlocks when you commit above.