Recover MCP tools after transport closes#13098
Closed
swordfish444 wants to merge 1 commit intoopenai:mainfrom
Closed
Recover MCP tools after transport closes#13098swordfish444 wants to merge 1 commit intoopenai:mainfrom
swordfish444 wants to merge 1 commit intoopenai:mainfrom
Conversation
Contributor
Author
Collaborator
|
We've updated our contribution guidelines to indicate that we're no longer accepting unsolicited code contributions. All code contributions are by invitation only. To read more about why we've taken this step, please refer to this announcement. |
Contributor
Author
|
Follow-up update after true end-to-end validation on macOS with the patched app-server: Additional fix
Automated checks run
E2E validation (isolated patched app-server)Server:
Chrome DevTools MCP
Playwright MCP
This reproduces the transport-drop scenario and verifies in-session recovery for both affected browser MCPs without restarting Codex. |
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
This PR makes MCP tool calls self-heal when the underlying MCP transport has closed, instead of requiring a Codex app restart.
It addresses the user-facing failure pattern reported in #6649 (Playwright / Chrome DevTools MCP ending in
Transport closedand staying wedged).What changed
McpConnectionManager.transport closed, Codex now:test_stdio_serverwith a test-onlyMCP_TEST_EXIT_AFTER_CALLmode used by the regression test.Why this helps browser MCPs
Playwright and Chrome DevTools MCP failures in long-lived sessions often surface as
Transport closedand remain unrecoverable until app restart. This change converts that into in-session recovery for subsequent calls.QA checklist
just fmtjust fix -p codex-corejust fix -p codex-rmcp-clientcargo build -p codex-rmcp-client --bin test_stdio_servercargo test -p codex-core mcp_tool_call_recovers_from_transport_closedcargo test -p codex-rmcp-clientcargo test --all-features(not run yet; can run before merge if requested)cc @gpeal for visibility, since this overlaps the browser MCP transport thread history.