Repository navigation
fix(mcp): answer workflow MCP JSON-RPC errors over HTTP 200 instead of session-loss statuses - #9561
Merged
Merged
Conversation
…f session-loss statuses
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Collaborator
Author
|
@greptile review |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryWorkflow MCP requests now receive JSON-RPC errors over HTTP 200 instead of misleading HTTP 400/401/404 responses.
Reviews (1) · Last reviewed commit: "fix(mcp): build the routed test request ..." · Reviewed by Greptile |
This was referenced Nov 2, 2026
This branch was previously deployed
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
tools/callparams, undeployed workflow, and workflow-service 400/404 failures passed through). In Streamable HTTP those statuses mean a lost or bad session: the MCP SDK client turns any non-2xx into aStreamableHTTPErrorand drops the JSON-RPC body, and Sim's own MCP client treats 400/404 as a dead session, retires the pooled connection, and retries a call that can never succeedjsonRpcErrorResponsedecides the status for every request-scoped JSON-RPC error in one place: 400/401/404 go out at 200 (as the SDK's reference server sends protocol errors); 408/409/413/429/499/500/503 keep their retry, limit, and alarm meaning.data.httpStatusstill records the workflow service's statustext/event-streamalready received everytools/callerror at 200 inside the stream; this makes the JSON path agreeTool name requiredbranch (the params schema already requires a non-empty name)Type of Change
Testing
route.test.ts: drives the route with the real SDKClient+StreamableHTTPClientTransport(MethodNotFound now arrives asMcpError), plus a table over the JSON path for invalid params, unknown tool, undeployed workflow, and workflow-service 404/400 failuresbun run lint,check:test-patterns,check:comment-hygiene,check:source-conventions,check:explicit-any; full type-check and audits left to CIChecklist
test-auditauthoring gate)