Expand description
Human-in-the-loop: the ask_human internal tool and the workflow
human node, wired to the interface.
The flow: an ask flips (or creates) an A2A task to input-required with
the question as its status message — every attached display client renders
an answerable gate — and the asking unit suspends as a
PendingKind::Human. A SendMessage carrying that taskId resolves the
pending with the reply text: a turn’s tool call returns it to the model, a
workflow human step completes with it as output. Tasks are durable, so a
run’s gate survives a restart (rebuilt from the suspended step). A turn’s
gate degrades to conversation continuation instead: the asking child does
not outlive the process, so there is no tool call left to return into, and
the answer starts a fresh turn carrying it.
Fallback (agent.ask_human_fallback) when NO human channel exists
(interface.enabled off): fail (default — error immediately), wait
(park until the ask timeout), or auto — an LLM judge answers on the
operator’s behalf (also fired when an interface-served gate times out
unanswered). Auto answers are marked as auto in the task, the log and the
audit stream — never mistakable for a human decision.