Skip to content

fix: bound raw session ID initialize probe - #469

Open
jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:codex/fix-session-id-probe-timeout
Open

fix: bound raw session ID initialize probe#469
jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:codex/fix-session-id-probe-timeout

Conversation

@jstar0

@jstar0 jstar0 commented Aug 26, 2026

Copy link
Copy Markdown

Fixes #428.

The raw initialize probe used to inspect MCP-Session-Id had no timeout and never released its response body. A server that accepted the connection without responding could stall the scenario, while a long-lived SSE response could keep the connection open after the header was inspected.

This change:

  • bounds the probe with a 5-second AbortSignal.timeout;
  • cancels the response body after reading the session header, including long-lived SSE responses;
  • preserves the existing check IDs, statuses, and best-effort session termination behavior.

Verification:

  • npm test
  • npm run build
  • npm run typecheck
  • npm run lint

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.

lifecycle.ts session-id probe: raw initialize fetch is unbounded and never consumes the response body

1 participant