fix: avoid replaying ambiguous stale stdio MCP calls#924
Open
9s5bz2jvd2-lang wants to merge 2 commits into
Open
fix: avoid replaying ambiguous stale stdio MCP calls#9249s5bz2jvd2-lang wants to merge 2 commits into
9s5bz2jvd2-lang wants to merge 2 commits into
Conversation
9s5bz2jvd2-lang
marked this pull request as ready for review
July 15, 2026 00:48
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
status="error",outcome="ambiguous", andretryable=falsefor the in-flight call.retry_policy="safe"opt-in for callers that have independently verified replay safety. No production caller opts in in this patch.Validation
git diff --checkmain: 21 passedmain: 177 passedmain: 659 passedFIX_CONFIRMEDPost-review timeout completion
3b51e21386f3c003a1405f4c0616e1600456fb28(fix(mcp): mark post-submit timeouts ambiguous).TimeoutErrorraised afterasyncio.run_coroutine_threadsafe()has returned a Future now returnsoutcome="ambiguous"andretryable=false; the local Future is cancelled for cleanup only, with no claim that the remote call was cancelled and no blind replay.git diff --check,python -m compileall -q src/lingtai/services/mcp.py, focused test module 23 passed, and relevant MCP suite 156 passed.Notes
MCPClientand its regression tests;HTTPMCPClientis unchanged.