fix: keep fetch on HTTP/1.1 so Node 26 does not exit the wizard mid-run - #1203
Merged
Conversation
Node 26 bundles undici 8, which turns HTTP/2 on for fetch. The MCP SDK aborts its GET event stream on close() before the response headers arrive, node:http2 creates an orphan ClientHttp2Stream for the server's late HEADERS, and undici's idle-session reaper destroys the socket 4s later with an InformationalError that the orphan re-emits with no listener. posthog-node's exception autocapture exits the process on it. Force HTTP/1.1 on the global dispatcher, the same call pi's CLI makes. Closes #1198 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchuses HTTP/2. The MCP SDK aborts its GET event stream whenfetchInstructionscallsclient.close()before the response headers arrive.node:http2then creates an orphanClientHttp2Streamfor the server's late HEADERS. Four seconds later undici's idle-session reaper destroys the socket with anInformationalError, the orphan re-emits it with no listener, and posthog-node's exception autocapture exits the wizard. Closes wizard exits mid-run with "InformationalError: socket idle timeout" #1198.bin.ts. This is the same call pi's CLI makes in itshttp-dispatcher.undici8.5.0 becomes a direct dependency; it is already in the tree through pi.mainexits 1 about 6.5s after detection, on Node 22 the same run stays up. The orphan-stream behavior reproduces with rawnode:http2on Node 22, 24, and 26; only Node 26 turns HTTP/2 on. TheTODOblock inbin.tslists what must change upstream before this line can go.http/1.1tomcp.posthog.com.Upstream status
Alternative on the table: #1199 adds a process-level
uncaughtExceptionhandler that ignores this one error. This PR removes the HTTP/2 session instead, so there is nothing to ignore. Node 26 in the CI matrix is a separate PR.🤖 Generated with Claude Code