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
The server **MUST** acknowledge the request with an empty result, even if the task ID does not represent a valid task. The acknowledgement is _eventually consistent_: the server **MAY** accept the responses and return the ack before the task's observable status (via `tasks/get` or `notifications/tasks/status`) reflects them. Clients **SHOULD** track `inputRequests` keys to avoid responding to requests more than once.
454
+
On success, the server **MUST** acknowledge the request with an empty result. The acknowledgement is _eventually consistent_: the server **MAY** accept the responses and return the ack before the task's observable status (via `tasks/get` or `notifications/tasks/status`) reflects them. Servers **SHOULD** return a JSON-RPC error if the `taskId` does not correspond to a known task, or if the `requestState` fails integrity verification (see [Request State Management](#request-state-management)). Clients **SHOULD** track `inputRequests` keys to avoid responding to requests more than once.
455
455
456
456
A server **SHOULD** ignore any `inputResponses` responses mapped to a key that is not currently outstanding for the task — including keys that were never issued, keys that have already been answered, and keys whose corresponding request has been superseded. A server **MAY** accept a partial set of responses (a strict subset of currently-outstanding keys); in that case the task remains in `input_required` until the remaining responses arrive.
The server **MUST** acknowledge the request with an empty result, even if the task ID does not represent a valid task. Cancellation processing is _eventually consistent_ — the task's observable status **MAY** remain `working` (or some other non-terminal status) after the ack, and **MAY** ultimately reach a terminal status other than `cancelled` if the work finished before cancellation could take effect.
487
+
On success, the server **MUST** acknowledge the request with an empty result. Servers **SHOULD** return a JSON-RPC error if the `taskId`does not correspond to a known task, or if the `requestState` fails integrity verification (see [Request State Management](#request-state-management)). Cancellation processing is _eventually consistent_ — the task's observable status **MAY** remain `working` (or some other non-terminal status) after the ack, and **MAY** ultimately reach a terminal status other than `cancelled` if the work finished before cancellation could take effect.
488
488
489
489
Cancellation is **cooperative**: The request signals intent, and the server decides whether and when to honor it. A server is not obligated to actually stop the work; it is only obligated to acknowledge the request. Eventual transition to `cancelled` is not guaranteed.
490
490
@@ -829,8 +829,11 @@ Tasks use two error reporting mechanisms:
829
829
830
830
Servers **MUST** return standard JSON-RPC errors for the following protocol error cases:
831
831
832
-
- Invalid or nonexistent `taskId` in `tasks/get`: `-32602` (Invalid params)
833
-
- Note: `tasks/update` and `tasks/cancel` acknowledge requests for any task ID without error; see [Task Input Requests](#task-input-requests) and [Task Cancellation](#task-cancellation).
832
+
- Invalid or nonexistent `taskId`: `-32602` (Invalid params)
833
+
- Servers **MUST** return this error for `tasks/get`.
834
+
- Servers **SHOULD** return this error for `tasks/update` and `tasks/cancel`.
- Servers **SHOULD** return this error for `tasks/update` and `tasks/cancel` when `requestState` fails integrity verification (see [Request State Management](#request-state-management)).
834
837
- Internal errors: `-32603` (Internal error)
835
838
836
839
Servers **SHOULD** provide informative error messages to describe the cause of errors.
@@ -962,6 +965,8 @@ In the `2025-11-25` design of tasks, `tasks/cancel` returned a task describing t
962
965
963
966
The eventual-consistency on the ack is the same separation as for `tasks/update`: The server may record the cancellation request and respond before the worker has actually transitioned the task, without allowing the client to interpret the ack as strongly-consistent.
964
967
968
+
While `tasks/update` and `tasks/cancel` use ack-only response shapes for the reasons above, servers **SHOULD** still return errors for clearly invalid requests — such as an unknown `taskId` or a `requestState` that fails integrity verification. The ack-only design is about avoiding synchronous reads of task state in the success path, not about suppressing errors that the server can detect at request time. Returning errors for invalid inputs gives clients a faster signal that something is wrong, rather than forcing them to discover the problem indirectly through subsequent `tasks/get` polls.
0 commit comments