Skip to main content
Loops support two HITL modes: start confirmation (pause before the first iteration) and iteration review (pause between iterations for human feedback). All HITL settings are configured via HumanReview.

Start Confirmation

When requires_confirmation=True, the loop pauses before executing:
  • Confirm: Execute the loop iterations
  • Reject: Skip the entire loop

Parameters

Loop Behavior

The confirmation happens once before the loop starts. Individual iterations do not pause for confirmation. For per-iteration pauses, see Iteration Review.

Iteration Review

Set requires_iteration_review=True to pause between loop iterations. After each iteration completes, the workflow pauses for human review. The reviewer can accept the result (stopping the loop) or reject to run another iteration.

Iteration Review Parameters

Iteration Review Behavior

Iteration review requirements appear in run_output.steps_requiring_output_review, the same property used for step output review.
requires_iteration_review is only supported on Loop. Passing it to Step or Router raises a ValueError.

With should_continue

The should_continue function controls iteration. Confirmation happens before any iteration:

Timeout

Set a deadline for user responses during loop HITL pauses. See the dedicated Timeout page for full details.

Streaming

Handle loop HITL in streaming workflows:

Developer Resources