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
Decoding the numeric JSON-RPC request ID 9007199254740993 changes it to 9007199254740992. This affects request/response correlation: a server can execute a request successfully but echo the wrong ID, and distinct numeric IDs can collapse to the same internal ID.
To Reproduce
Run this program with github.com/modelcontextprotocol/go-sdk v1.8.0:
A separate raw HTTP reproduction against an SDK Streamable HTTP server also returned HTTP 200 with ID 9007199254740992 for a successful tools/call request whose ID was 9007199254740993. The application handler did not manipulate IDs. String ID "9007199254740993" was preserved correctly.
Proposed fix: #1375. It preserves numeric IDs within int64, keeps integral decimal/exponent forms, and preserves cancellation request IDs. The regression test fails before the patch and passes afterward; full Go tests and targeted race tests pass. The PR also documents the numeric cancellation field's dynamic type change to json.Number and the int64 range boundary. The fix is proposed, not yet merged or released.
Activity
fix: support exact JSON number decoding for large request IDs above 2…