Skip to content

fix: keep related request id zero from debouncing#2120

Open
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/related-request-id-zero-debounce
Open

fix: keep related request id zero from debouncing#2120
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/related-request-id-zero-debounce

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • treat numeric relatedRequestId: 0 as present when deciding whether a notification can be debounced
  • add regression coverage so related notifications for request id zero are sent immediately instead of being coalesced
  • add a patch changeset for @modelcontextprotocol/core

Fixes #2117

To verify

  • corepack pnpm --filter @modelcontextprotocol/core test -- --run packages/core/test/shared/protocol.test.ts
  • corepack pnpm --filter @modelcontextprotocol/core typecheck
  • corepack pnpm --filter @modelcontextprotocol/core lint
  • git diff --check origin/main..HEAD

The pre-push hook also passed the repo typecheck/build/lint tasks.

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

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: ffe6967

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

This PR includes changesets to release 1 package
Name Type
@modelcontextprotocol/core 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 18, 2026

Open in StackBlitz

@modelcontextprotocol/client

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

@modelcontextprotocol/server

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

@modelcontextprotocol/express

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

@modelcontextprotocol/fastify

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

@modelcontextprotocol/hono

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

@modelcontextprotocol/node

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

commit: ffe6967

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.

relatedRequestId 0 is treated as absent by notification debounce guard

1 participant