Fix cross-user MCP replies, and recover live lookups (review, area 3) - #313
Merged
Merged
Conversation
- Every MCP HTTP request was sent with JSON-RPC id 2 on the one session the process shares; the server matches replies by id, so two users' overlapping lookups got each other's results -- one carrying another reader's identifiers and analysis token -- and the other hung. Each request now has its own id, and a reply to any other id is refused. Against the real reactome-mcp: 20 overlapping calls, 0 crossed (the old client hung until timeout on the same test). - A lost session (reactome-mcp answers 400 'No valid session' after a restart) is re-initialized once and the call retried; initialization is locked. A failed MCP start is retried after 60s rather than remembered for the life of the process. - Without live tools, a live-routed question falls back to retrieval at the same node; the search-page stream no longer opens at preprocess then, so the query expander's alternate questions are not streamed as the answer. - The live analysis tool's output reaches the model without the analysis token or token-bearing links; a failed lookup tells the model its type, not a message carrying the MCP's internal URL. - At most 6 tool calls run per round; the rest are answered unrun. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
These come from the max-level review of the agent and retrieval code. Each was reproduced by the reviewer, and the first by four reviewers independently against the real reactome-mcp.
without_token()I didn't restart the MCP server to test session renewal live: it's the website's container, and the website shares it. The unit test uses the exact 400 response shape the reviewer recorded from it.
./checks.shpasses.🤖 Generated with Claude Code