You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/draft/basic/utilities/tasks.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -641,7 +641,7 @@ Tasks can be in one of the following states:
641
641
-`working`: The request is currently being processed
642
642
-`input_required`: The request is waiting on additional input from the requestor
643
643
-`completed`: The request completed successfully and results are available
644
-
-`failed`: The task lifecycle itself encountered an error, unrelated to the associated request logic
644
+
-`failed`: The associated request did not complete successfully. For tool calls specifically, this includes cases where the tool call result has `isError` set to true.
645
645
-`cancelled`: The request was cancelled before completion
646
646
-`unknown`: A terminal fallback state for unexpected error conditions when the receiver cannot determine the actual task state
647
647
@@ -770,7 +770,7 @@ Receivers are not obligated to retain task metadata indefinitely. It is complian
770
770
771
771
### Task Execution Errors
772
772
773
-
When the underlying request fails during execution, the task moves to the `failed` status. The `tasks/get` response **SHOULD** include an `error` field with details about the failure.
773
+
When the underlying request does not complete successfully, the task moves to the `failed` status. This includes JSON-RPC protocol errors during request execution, or for tool calls specifically, when the tool result has `isError` set to true. The `tasks/get` response **SHOULD** include an `error` field with details about the failure.
774
774
775
775
**Example: Task with execution error**
776
776
@@ -787,7 +787,7 @@ When the underlying request fails during execution, the task moves to the `faile
787
787
}
788
788
```
789
789
790
-
For tasks that wrap requests with their own error semantics (like `tools/call` with `isError: true`), the task should still reach `completed` status, and the error information is conveyed through the result structure of the original request type.
790
+
For tasks that wrap tool call requests, when the tool result has `isError` set to true, the task should reach `failed` status. The error information is conveyed both through the task's `failed` status and through the result structure when retrieved via `tasks/result`.
0 commit comments