R.3

Task states

Nine values describe a task, and whether the current one is active, interrupted, or terminal tells the client what it can do next.

The proto marks four states terminal and two interrupted. Neither it nor the prose gives a transition table, so the agent decides the order. A blocking SendMessage returns at a terminal or interrupted state. Task, TaskStatus, and TaskState classifies the values and collects the transitions the kit makes. Interrupted states and CancelTask and terminal states explain the client's next step.

StateClassSet byThe client does next
TASK_STATE_UNSPECIFIEDnoneNobody: the zero valueTreat it, and any unknown name, as an error.
TASK_STATE_SUBMITTEDactiveThe server, on creationWait, poll, or subscribe.
TASK_STATE_WORKINGactiveThe agent, while it worksAs for a submitted task
TASK_STATE_INPUT_REQUIREDinterruptedThe agent, with a questionAnswer with a new message that carries the same taskId and contextId.
TASK_STATE_AUTH_REQUIREDinterruptedThe agent, for an authorizationPass the request to whoever approves it, outside A2A, and subscribe, register a webhook, or poll.
TASK_STATE_COMPLETEDterminalThe agent, when the work is doneRead the artifacts for the result. Follow up in a new task with referenceTaskIds.
TASK_STATE_FAILEDterminalThe agent, unable to do the workRead the status message, fix the input, and start a new task.
TASK_STATE_CANCELEDterminalThe agent, after CancelTaskStart a new task in the same context.
TASK_STATE_REJECTEDterminalThe agent, refusing the taskStop the loop, and follow the status message.

Until a task ends, CancelTask asks the server to stop it, and success is not guaranteed. A terminal task never changes. A message on its taskId and SubscribeToTask fail with UnsupportedOperationError, and CancelTask fails with TaskNotCancelableError. GetTask still returns it while the server keeps it.

A stream must close when the task reaches a terminal state. At an interrupted state the sources disagree (conflict D3). The kit closes its stream at TASK_STATE_INPUT_REQUIRED and keeps it open through TASK_STATE_AUTH_REQUIRED, as the kit README lists. So after any close, call GetTask and act on the state it returns.

A2A protocol 1.0.1 · 3303592 · 2026-05-28 · Edition 2026.10