Skip to content

Commit 9b717e2

Browse files
committed
Make "failed" reflect the request error
1 parent 2b9c6da commit 9b717e2

File tree

1 file changed

+3
-3
lines changed
  • docs/specification/draft/basic/utilities

1 file changed

+3
-3
lines changed

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ Tasks can be in one of the following states:
641641
- `working`: The request is currently being processed
642642
- `input_required`: The request is waiting on additional input from the requestor
643643
- `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.
645645
- `cancelled`: The request was cancelled before completion
646646
- `unknown`: A terminal fallback state for unexpected error conditions when the receiver cannot determine the actual task state
647647

@@ -770,7 +770,7 @@ Receivers are not obligated to retain task metadata indefinitely. It is complian
770770

771771
### Task Execution Errors
772772

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.
774774

775775
**Example: Task with execution error**
776776

@@ -787,7 +787,7 @@ When the underlying request fails during execution, the task moves to the `faile
787787
}
788788
```
789789

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`.
791791

792792
## Security Considerations
793793

0 commit comments

Comments
 (0)