Skip to content

Commit 4763a04

Browse files
authored
Apply suggestion
1 parent 93eecaa commit 4763a04

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

docs/concepts/sessions/sessions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ Stateless mode has the simplest cancellation story: the handler's `CancellationT
425425

426426
In stateful modes (Streamable HTTP, SSE, stdio), a client can cancel a specific in-flight request by sending a [`notifications/cancelled`](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/cancellation) notification with the request ID. The SDK looks up the running handler and cancels its `CancellationToken`. The handler receives an `OperationCanceledException` like any other cancellation.
427427

428-
- The `initialize` request cannot be cancelled (per the MCP specification)
429428
- Invalid or unknown request IDs are silently ignored
430429
- In stateless mode, there is no persistent session to receive the notification on, so client-initiated cancellation does not apply
431430
- For [task-augmented requests](xref:tasks), the MCP specification requires using [`tasks/cancel`](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks#cancelling-tasks) instead of `notifications/cancelled`. The SDK uses a separate cancellation token per task (independent of the original HTTP request), so `tasks/cancel` can cancel a task even after the initial request has completed. See [Tasks and session modes](#tasks-and-session-modes) for details.

0 commit comments

Comments
 (0)