Skip to content

fix(client): fail fast after SSE reconnect exhaustion#2099

Open
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/streamable-http-sse-reconnect-exhaustion
Open

fix(client): fail fast after SSE reconnect exhaustion#2099
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/streamable-http-sse-reconnect-exhaustion

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • raise the default standalone SSE reconnection budget from 2 attempts to 10
  • keep track of standalone SSE reconnection exhaustion and fail future request sends instead of letting POSTs succeed while responses are unreachable
  • include a fallback HTTP status in SSE-open errors when statusText is empty

Fixes #2098.

To verify

  • pnpm --filter @modelcontextprotocol/client test -- streamableHttp.test.ts
  • pnpm --filter @modelcontextprotocol/client typecheck
  • pnpm --filter @modelcontextprotocol/client lint
  • pnpm --filter @modelcontextprotocol/client build
  • git diff --check

The pre-push hook also ran repo-wide build/typecheck/lint successfully.

@he-yufeng he-yufeng requested a review from a team as a code owner May 15, 2026 18:07
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: 3597345

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@modelcontextprotocol/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2099

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2099

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2099

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2099

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2099

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2099

commit: 3597345

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.

StreamableHTTPClientTransport: 2-retry SSE reconnect ceiling + silent-success after exhaustion

1 participant