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
For a well-formed JSON-RPC request with a nonexistent method, the PHP SDK returns an error response with id:"" instead of preserving the original request id.
The request has jsonrpc:"2.0", a readable request id, a string method name, and object params. The implementation appears to identify the method as unknown because the error message includes the submitted method name, but the response loses the request id.
Unknown methods can happen with version skew, optional extensions, experimental methods, or methods renamed/removed across protocol or SDK versions.
Tested with:
PHP SDK: reproduced with stable release v0.6.0 (433c84b58af346dd32f15f9909679e96a46ebe23)
Streamable HTTP returns the same JSON-RPC error body (id:"", code:-32600) inside an HTTP 200 response.
In both transports, the server remains usable and subsequent pings succeed.
Additional context
The same id:"" behavior also appears on broader validation-error paths, including malformed initialize params, wrong or missing jsonrpc, an empty method string, and method as a number. Those cases are more debatable because some malformed-envelope inputs can make id recovery implementation-dependent.
Fixed by #379 (threads the recoverable request id through InvalidInputMessageException in MessageFactory) and #442 (omits the id when it was never known). Verified against the original repro on main: {"jsonrpc":"2.0","id":7,"method":"nonexistent/method","params":{}} now recovers id: 7 instead of fabricating id:"".
Activity
chr-hertel commentedon Aug 18, 2026
Fixed by #379 (threads the recoverable request id through
InvalidInputMessageExceptioninMessageFactory) and #442 (omits the id when it was never known). Verified against the original repro on main:{"jsonrpc":"2.0","id":7,"method":"nonexistent/method","params":{}}now recoversid: 7instead of fabricatingid:"".