- Pause 1 (step-level): user sees
confirmation_message, callsreq.confirm(). - Pause 2 (executor-level): agent calls
send_alert, user approves the specific tool call. - Step finishes.
The Active-Requirement Pattern
step_requirements accumulates across pauses within a single run. The first pause adds the step-level requirement. After resolution and continue, a second pause adds the executor-level requirement on top of it. To detect the current pause type, always look at the last entry.
Resolution Loop
Wrap continue calls in awhile is_paused: loop. Each pause resolves one gate; the workflow either pauses again or completes.