When a v2026-07-28 streamable HTTP client has notification handlers installed, Client.Connect opens subscriptions/listen after server/discover. If the server immediately rejects that subscriptions/listen request with a JSON-RPC error, Connect currently still returns a usable session.
What I did:
I added a regression test with a fake streamable server that returns a successful server/discover response, then returns a JSON-RPC InvalidParams error for subscriptions/listen. The client is configured with ToolListChangedHandler so it attempts the listen call during connect.
What I saw:
On current origin/main at 64e454e35c23, the regression test fails because Connect succeeds even though the listen request was rejected.
What I expected:
Connect should fail and surface the subscriptions/listen error. Otherwise callers believe notification subscriptions are active when the server already rejected them.
Version:
origin/main at 64e454e35c23
Go version:
go version go1.26.5 darwin/arm64
When a v2026-07-28 streamable HTTP client has notification handlers installed,
Client.Connectopenssubscriptions/listenafterserver/discover. If the server immediately rejects thatsubscriptions/listenrequest with a JSON-RPC error,Connectcurrently still returns a usable session.What I did:
I added a regression test with a fake streamable server that returns a successful
server/discoverresponse, then returns a JSON-RPCInvalidParamserror forsubscriptions/listen. The client is configured withToolListChangedHandlerso it attempts the listen call during connect.What I saw:
On current
origin/mainat64e454e35c23, the regression test fails becauseConnectsucceeds even though the listen request was rejected.What I expected:
Connectshould fail and surface thesubscriptions/listenerror. Otherwise callers believe notification subscriptions are active when the server already rejected them.Version:
origin/mainat64e454e35c23Go version:
go version go1.26.5 darwin/arm64