failed is the error terminal state. The agent could not complete the task due to an unrecoverable error. The task object includes an error message explaining the failure. Failed tasks cannot be retried on the same task ID.
Description
failed indicates the agent encountered an error it could not recover from. Unlike input-required (where the agent can resume), failed is terminal: the task is over and cannot be restarted on the same task ID.
The task object includes a status.message field with a human-readable explanation of the failure. Possible causes: the agent's upstream dependencies failed, the input was invalid in a way that only became apparent during execution, or the agent's capabilities do not cover this specific case.
Clients should treat failed as a signal to either retry by creating a new task with a different approach, or to surface the error to the user. The error message should be included in any retry attempt as context.
Terminal state
Once a task reaches failed, its state is immutable. tasks/cancel will return an error on a task in this state.