Repository navigation
Settle cancelled stdio MCP services - #617
Merged
Merged
Conversation
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.
Turn cancellation could report settlement after a local MCP interrupt or process leader exit while the MCP service's descendants continued running. Add the Runtime–Harness
StopMCPcontract so cancellation captures affected stdio services, drains native work, stops those services and their descendants, and waits for each old Process scope'sScopeClosedbefore reusable settlement. Other services and the workspace remain available. Stdio MCP admission now requires declared delegated cgroup v2 support; unsupported hosts fail with a typed error.All three adapters retain current-Turn call ownership through local failures and cancellation races, then invalidate or reconnect only the selected native clients. Codex uses its existing persisted
root_turn_idto include child calls that finish between observations. Its pinned native source receives a small explicit client-invalidation operation, built through the upstream build helpers with source, patch and artifact provenance; the previous precompiled-package path is replaced. Mcode preserves genuine SDK-response provenance without changing native error results. Protocol documentation and the coverage ledger are updated in English and Chinese.Validation:
go vet, cross-platform builds, formatting, names, translations and CI selection checks passed.ScopeClosedafter cancellation and leader exit; changed cancellation and ownership cases passed race ×50.Known limits: Claude's native error frames cannot distinguish local failures from genuine server
isErrorreplies, so failed stdio calls remain cancellation targets within their current Turn. Codex cannot reliably attribute a previously active child Turn steered by another root when the observer first sees it after settlement; that narrow case remains unqualified in the coverage ledger.All 24 CI checks passed for
2e0805b8. Fresh independent review findings were resolved with focused follow-up validation; the documented narrow Codex attribution limit remains deferred.