Skip to content

fix: reject duplicate streamable request ids#1006

Open
Zhang-986 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Zhang-986:codex/streamable-duplicate-request-id
Open

fix: reject duplicate streamable request ids#1006
Zhang-986 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Zhang-986:codex/streamable-duplicate-request-id

Conversation

@Zhang-986

Copy link
Copy Markdown

Summary

  • Reject duplicate in-flight JSON-RPC request IDs for streamable HTTP sessions before publishing the second request.
  • Keep the existing request stream routing intact when a duplicate is rejected.
  • Add regression coverage for duplicate request stream registration.

Fixes #1004

Tests

  • go test ./mcp -run TestStreamableServerRejectsDuplicateInFlightRequestID -count=1
  • go test ./mcp -count=1
  • go test ./... -count=1
  • git diff --check

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.

Streamable HTTP server misroutes responses when concurrent requests on one session reuse a JSON-RPC request ID

1 participant