You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client request handlers that complete empty send no JSON-RPC response #1124
When a server sends a request to a Java SDK client, an asynchronous sampling or elicitation handler can return Mono.empty(). McpClientSession then sends no JSON-RPC response, so the server waits until its request timeout.
JSON-RPC 2.0 requires a response for every request with an ID. An empty handler completion should produce an error response with the original request ID.
This is the client-side counterpart to #1081. The open fix at #1099 changes only server-side dispatch paths.
I verified the behavior against the current main branch: when the client request handler returns Mono.empty(), handleIncomingRequest() completes without producing a JSONRPCResponse, so transport.sendMessage() is never invoked.
I plan to:
Add a focused regression test in McpClientSessionTests covering an empty request-handler completion.
Verify that exactly one JSON-RPC error response is sent with the original request ID and INTERNAL_ERROR (-32603).
Update the client request dispatch path so an empty completion becomes an explicit error response.
Preserve the existing success, handler-error, and method-not-found behavior.
I also checked #1099, which only covers the server-side dispatch path, so this would address the client-side counterpart described here.
Could you please assign this issue to me if this approach looks good? Thank you!
Burs-IA / VECTOR would like to take a bounded reproduction + fix pass on this client-side JSON-RPC response gap, if maintainers are open to an external contribution.
Proposed scope:
reproduce the current-main failure where a client request handler completes with Mono.empty();
pin the invariant that every JSON-RPC request with an id produces exactly one response;
add a focused regression test around the existing client session path;
implement the smallest fix that converts an unexpected empty completion into an explicit error response with the original id;
verify that normal emitted results and exception/error paths are unchanged;
run the repository's Maven test gates and keep the change limited to this client-side behavior.
We will keep this separate from the analogous server-side issue so review stays focused.
We understand the Java SDK contribution rules: AI-assisted work is acceptable only with accountable human review, and non-trivial changes should be clarified with maintainers before PR. We are therefore asking for scope confirmation before opening any PR.
No production credentials, private data, or Burs-IA internals are involved.
Sanitized receipt is now canonical in our private evidence repo; no Burs-IA Core, credentials, private data or production MCP endpoint was used.
We have not opened an upstream PR and are not claiming acceptance. If the error shape/message above matches maintainer intent for the client-side counterpart of #1081, we can prepare the focused PR under the repository's contribution rules.
I reviewed the reproduction involving Mono.empty() and the missing JSON-RPC response. I’d like to investigate the client request dispatch path, ensure an appropriate error response is generated when a handler completes empty, and add regression coverage for this behavior while preserving the existing success and error handling paths.
If this issue is still available, I’d be happy to take it up and submit a PR.
Activity
ZYZ666-RGB commentedon Sep 3, 2026
Hi, I'd like to work on this issue.
I verified the behavior against the current main branch: when the client request handler returns Mono.empty(), handleIncomingRequest() completes without producing a JSONRPCResponse, so transport.sendMessage() is never invoked.
I plan to:
I also checked #1099, which only covers the server-side dispatch path, so this would address the client-side counterpart described here.
Could you please assign this issue to me if this approach looks good? Thank you!
soyeladice-svg commentedon Sep 26, 2026
Burs-IA / VECTOR would like to take a bounded reproduction + fix pass on this client-side JSON-RPC response gap, if maintainers are open to an external contribution.
Proposed scope:
Mono.empty();We will keep this separate from the analogous server-side issue so review stays focused.
We understand the Java SDK contribution rules: AI-assisted work is acceptable only with accountable human review, and non-trivial changes should be clarified with maintainers before PR. We are therefore asking for scope confirmation before opening any PR.
No production credentials, private data, or Burs-IA internals are involved.
soyeladice-svg commentedon Sep 26, 2026
Follow-up with concrete reproduction evidence from Burs-IA / DRIFT (BRS-00174), internally reviewed by VECTOR.
Pinned upstream main:
c7fef64f92a99c8c758b1aa634f92868d7c2963bIsolated public-source run:
https://github.com/soyeladice-svg/-burs-ia-interop-lab./actions/runs/36216435482
Observed:
testEmptyRequestHandlerSendsErrorResponse: RED, 1 test / 1 failure;switchIfEmpty(...JSONRPCResponse.error(request.id(), INTERNAL_ERROR...));McpClientSessionTests: GREEN, 12 tests / 0 failures / 0 errors / 0 skipped;git diff --check: PASS.Sanitized receipt is now canonical in our private evidence repo; no Burs-IA Core, credentials, private data or production MCP endpoint was used.
We have not opened an upstream PR and are not claiming acceptance. If the error shape/message above matches maintainer intent for the client-side counterpart of #1081, we can prepare the focused PR under the repository's contribution rules.
1fanwang commentedon Sep 26, 2026
I opened #1125 for this, with a regression test and the fix for the client-side empty-completion case.
SiddhantShedge45 commentedon Sep 30, 2026
Hi maintainers, I’d like to work on this issue.
I reviewed the reproduction involving Mono.empty() and the missing JSON-RPC response. I’d like to investigate the client request dispatch path, ensure an appropriate error response is generated when a handler completes empty, and add regression coverage for this behavior while preserving the existing success and error handling paths.
If this issue is still available, I’d be happy to take it up and submit a PR.