Skip to content

Allow Streamable HTTP GET reconnection#1713

Open
lntutor wants to merge 1 commit into
modelcontextprotocol:mainfrom
lntutor:fix/streamable-http-get-reconnect-1239
Open

Allow Streamable HTTP GET reconnection#1713
lntutor wants to merge 1 commit into
modelcontextprotocol:mainfrom
lntutor:fix/streamable-http-get-reconnect-1239

Conversation

@lntutor

@lntutor lntutor commented Jul 19, 2026

Copy link
Copy Markdown

Fixes #1239.

Summary

  • release the stateful session GET guard when an unsolicited SSE request ends
  • release the underlying transport GET/TCS guard for non-resumable sessions so the client can open a replacement GET stream
  • preserve event-store-backed state so notifications continue to be persisted for Last-Event-ID replay while disconnected
  • add transport-level and end-to-end HTTP regression coverage for sequential GET streams on the same session

This fixes reconnection after proxies/load balancers close an idle SSE connection. Server keep-alive comments can remain a separate hardening improvement; reconnecting no longer receives the permanent HTTP 400 described in the issue.

Tests

  • StreamableHttpServerTransportTests (6 passed across target frameworks)
  • GetStream_CanReconnectAfterPreviousRequestEnds (3 passed)
  • existing resumability reconnect tests (6 passed)
  • ASP.NET Core tests excluding the unavailable Node conformance executable (1,389 passed)
  • dotnet build ModelContextProtocol.slnx (36 projects, 0 warnings)
  • targeted dotnet format --verify-no-changes

The unfiltered ASP.NET Core run cannot execute conformance cases locally because node_modules/.bin/conformance is absent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notifications/tools/list_changed handler apparently times out over Streamable HTTP

1 participant