Recover browser MCP calls after broken-pipe transport failures#13100
Closed
swordfish444 wants to merge 2 commits intoopenai:mainfrom
Closed
Recover browser MCP calls after broken-pipe transport failures#13100swordfish444 wants to merge 2 commits intoopenai:mainfrom
swordfish444 wants to merge 2 commits intoopenai:mainfrom
Conversation
Contributor
Author
|
Adding additional routing based on issue history + MCP ownership signals: @etraut-openai @mzeng-openai. This PR includes macOS E2E repro + validation for browser MCP transport drops (Chrome DevTools and Playwright), with forced process-kill recovery in-session and no Codex app restart required. |
Collaborator
|
@swordfish444 Please do not submit PRs. If you want to suggest a new feature, file a feature request. |
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
Transport send error/Broken pipe(not just literalTransport closed)McpConnectionManagerWhy
On macOS, browser MCP transports (notably
chrome-devtoolsandplaywright) can die mid-session, surfacing as broken-pipe send errors. The previous matcher only recognizedTransport closed, so recovery did not trigger for these common failures.Changes
is_transport_closed_error(...)incodex-rs/core/src/mcp_connection_manager.rsto match:transport closedtransport send errortransport receive errorbroken pipe/connection resetis_transport_closed_error_matches_transport_closedis_transport_closed_error_matches_transport_broken_pipeis_transport_closed_error_does_not_match_non_transport_errorValidation
Automated
just fmtjust fix -p codex-corecargo test -p codex-core is_transport_closed_errorcargo test -p codex-core mcp_tool_call_recovers_from_transport_closedEnd-to-end (macOS, patched app-server)
Server:
./target/debug/codex app-server --listen ws://127.0.0.1:4322Chrome DevTools MCP:
mcp__chrome-devtools__new_page)kill -9 10162)MCP transport closed for server chrome-devtools; restartingPlaywright MCP:
mcp__playwright__browser_tabs)kill -9 10154 11782)MCP transport closed for server playwright; restartingRelated: #6649