- Steering a running task - the message is added to the active task as extra guidance.
- Answering a completed
needs_user_controltask - the phone handed a sensitive step back to the user (a login, a confirmation, a CAPTCHA); this call answers it and dispatches a continuation task.
Parameters
string
required
The active session that owns the task.
string
required
The running task to steer, or the completed
needs_user_control task to
answer.string
required
The guidance or answer to deliver.
Mode 1: steer a running task
- Keep monitoring the same
task_id- a message to a running task does not create a new task. - Success signal:
delivered_to_device. Afalsevalue means the message was recorded in task history but not delivered, usually because the task already completed.
Mode 2: answer a needs_user_control task
When a task completes withterminal: "needs_user_control", inspect
error.control_type and error.prompt to see what the phone needs, collect
the user’s answer - or let them complete the step directly on the device -
then send the reply. If the user handled the step on the phone, send a short
acknowledgement:
- Success signal: the presence of
continuation_task_idin the response. Heredelivered_to_device: falseis not a failure - the original task is already completed. - Monitor the
continuation_task_id, not the completed original task; it will not becomerunningagain. - A continuation task can itself finish with
needs_user_control; repeat the monitor-and-answer loop until a terminal outcome no longer requests control. - Repeating the same answer is safe, but a different second answer is rejected.
Related
phone_task_monitor- catches theneeds_user_controlhandoff- Task lifecycle - the handoff loop end-to-end