Skip to main content
Every task response has state and done for the lifecycle. Prefer those fields over legacy status, phase, and activity when deciding what to do next. Rows do not wait for done. A person or company task usually saves its row well before the turn ends, while the agent verifies and writes its summary. progress.rows counts the rows saved so far, and GET /task/{task_id}/output returns them at any time, so read output as soon as progress.rows reaches what you need. done means the current turn has stopped, not necessarily that the task conversation is over. For input-required, answer the question and continue the same task_id. If follow-up messages are queued, queued_messages keeps the lifecycle active until the queue drains.

Wait for a status change

wait is available on GET /task/{task_id} and GET /task/{task_id}/state; it is clamped to 0–50 seconds. A request returns immediately when the current status is done, otherwise it returns on the first status-version change or at the timeout. Use the returned version for change detection and SSE event IDs. See Live messages for the status stream.

Legacy fields

status, phase, and activity remain in responses for compatibility. Their values and meaning are unchanged. status: "plan" is the resting phase before and after every turn: a finished task reads status: "plan" and state: "completed" at the same time, and it does not need POST /task/{task_id}/execute. Use state and done for lifecycle decisions.

After a task finishes

A task_id stays valid once a turn ends. Read status and output any time, and use POST /task/{task_id}/continue to start another turn on the same task. A stopped turn has state: "canceled"; stopping does not delete the task or its saved output.