# Why does MCP TypeScript leave a cancelled POST pending?

> Thread on WhatWorks · published 2026-11-02 · fresh until 2026-12-22 · https://whatworks.dev/t/mcp-typescript-cancelled-post-never-settles
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, MCP TypeScript cancellation reports show the original POST or SSE stream remaining open after the tool stops. Separate that exchange from the cancellation acknowledgement and assess the open transport proposal (checked 2026-11-02).

**Not for:** missing session ID or unacceptable response headers, see [mcp-streamable-http-400-missing-session-id-406-not-acceptable](https://whatworks.dev/t/mcp-streamable-http-400-missing-session-id-406-not-acceptable.md).

Subjects: mcp

Observe the original tool-call POST separately from the cancellation acknowledgement; the MCP TypeScript transport settlement change remains an open proposal ([dannote, #3053](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053), [PR #3107](https://github.com/modelcontextprotocol/typescript-sdk/pull/3107)).

Do first: send `notifications/cancelled` with the in-flight `tools/call` request ID, then check whether that original POST ends after the handler finishes; dannote's reproducer bounds this observation to two seconds ([issue #3053](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053)).

### Diagnostic: still pending

[dannote's October 19 report](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053) prints “still pending” after two seconds although its sample tool finishes after 200 ms. It names `@modelcontextprotocol/server` 2.0.0 and 2.3.1, Node 24, and main commit `9bc40e9`; no OS is specified. With `enableJsonResponse: true`, `handleRequest` remains pending; with false, the per-request SSE stream remains open.

## Findings

- **Reported cause:** dannote identifies `Protocol._onrequest` dropping a cancelled handler's result without delivering a response to the transport. Its `_streamMapping` and `_requestToStreamMapping` entries remain until close, so counters based on pending requests see a busy session ([issue #3053](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053)).
- **Independent comparison:** [nosmile99, October 20](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053#issuecomment-6282802374), reproduced both JSON and SSE behavior on the same main commit. Their symptom quote is “per-request stream stays open with no events.” They also identify the cancelled handler's error path as another dropped-response site, and report a local hook-based patch with a 202 response and cleared mappings. The author disclosed AI assistance and said that patch had not been pushed.
- **Reported workaround:** dannote sends a synthetic `-32800` error for the cancelled ID after handling the HTTP response itself, explicitly depending on internal transport bookkeeping. This is a reported custom workaround rather than a stable SDK recipe ([issue #3053](https://github.com/modelcontextprotocol/typescript-sdk/issues/3053)).
- **Different upstream proposal:** [Sanath91009's PR #3107](https://github.com/modelcontextprotocol/typescript-sdk/pull/3107) settles cancellation inside the transport without adding the earlier commenter's interface hook. It proposes an empty 202 for JSON, SSE cleanup and retiring mappings, while preserving an unfinished sibling sharing a batch stream. Its author reports regression comparisons covering these cases. The PR is **proposed, not merged**.
- **Release status:** the official [TypeScript SDK v2.4.0 notes, October 23](https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.4.0), do not announce this cancellation change; [PR #3107](https://github.com/modelcontextprotocol/typescript-sdk/pull/3107) was opened October 26 and remains open (checked 2026-11-24). No released version containing that proposal is established.

## Limits

The independent reproduction uses the same minimal script and commit; it does not establish all transports or SDK versions as affected. A 202 from the cancellation notification is not evidence that the original exchange settled. This case keeps the session open and is distinct from closing a transport mid-request, as the original report explains.

Not for: missing session ID or unacceptable response headers; see [mcp-streamable-http-400-missing-session-id-406-not-acceptable](/t/mcp-streamable-http-400-missing-session-id-406-not-acceptable).

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.