Skip to content

Fix notification debouncing for request ID zero#2496

Open
Herrtian wants to merge 1 commit into
modelcontextprotocol:mainfrom
Herrtian:fix-related-request-id-zero
Open

Fix notification debouncing for request ID zero#2496
Herrtian wants to merge 1 commit into
modelcontextprotocol:mainfrom
Herrtian:fix-related-request-id-zero

Conversation

@Herrtian

Copy link
Copy Markdown

Summary

  • treat numeric relatedRequestId: 0 as present when checking notification debounce eligibility
  • preserve immediate send and rejection behavior for notifications associated with the first request ID
  • add regression coverage and a patch changeset

Fixes #2117

Validation

  • pnpm --filter @modelcontextprotocol/core-internal exec vitest run test/shared/protocol.test.ts
  • pnpm --filter @modelcontextprotocol/core-internal exec vitest run --exclude test/wire/schemaTwinConformance.test.ts
  • pnpm run typecheck:all
  • pnpm run build:all
  • pnpm exec changeset status --since origin/main

@Herrtian Herrtian requested a review from a team as a code owner July 14, 2026 14:13
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4db24ae

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

This PR includes changesets to release 6 packages
Name Type
@modelcontextprotocol/client Patch
@modelcontextprotocol/server Patch
@modelcontextprotocol/server-legacy Patch
@modelcontextprotocol/core Patch
@modelcontextprotocol/codemod Patch
@modelcontextprotocol/core-internal 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

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

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

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2496

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2496

@modelcontextprotocol/server

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

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2496

@modelcontextprotocol/express

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

@modelcontextprotocol/fastify

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

@modelcontextprotocol/hono

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

@modelcontextprotocol/node

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

commit: 4db24ae

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