Skip to content

fix: prevent stderr pipe deadlock in StdioClientTransport - #2803

Closed
KooshaPari wants to merge 1 commit into
modelcontextprotocol:v1.xfrom
KooshaPari:fix-2776-stderr-pipe-deadlock
Closed

fix: prevent stderr pipe deadlock in StdioClientTransport#2803
KooshaPari wants to merge 1 commit into
modelcontextprotocol:v1.xfrom
KooshaPari:fix-2776-stderr-pipe-deadlock

Conversation

@KooshaPari

Copy link
Copy Markdown

Fixes #2776

When stderr: 'pipe' is used and nobody attaches a reader, the pipe fills
up, the child process blocks on write(2), and the session silently hangs
— no error, no rejection, no timeout.

Fixed by calling .resume() on the stderr PassThrough stream after piping,
so it flows into the internal buffer and never blocks the child. A
consumer that attaches a listener still gets the data; one that does not
gets a working session instead of a hang.
@KooshaPari
KooshaPari requested a review from a team as a code owner September 13, 2026 05:08
Copilot AI lite review requested due to automatic review settings September 13, 2026 05:08
@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 647c39b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pkg-pr-new

pkg-pr-new Bot commented Sep 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@modelcontextprotocol/sdk@2803

commit: 647c39b

@KooshaPari KooshaPari closed this by deleting the head repository Sep 13, 2026
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.

2 participants