What this thread does
Close and reconnect the transport for the stale-session failure reported with MCP TypeScript client 2.0.0; automatic reinitialization and replay remain an unresolved proposal in the cited issue (xyonium, typescript-sdk #3056).
Do first: close the affected transport and reconnect, the recovery xyonium reports after the server discards its session (#3056).
Diagnostic: session not found
xyonium's October 20 report quotes “session not found” with @modelcontextprotocol/client 2.0.0 in a long-lived DeepSeek Harness client, dsh-mcp-client 0.2.0-rc.2, talking to a stateful Rancher MCP server restarted during certificate rotation. Subsequent requests keep carrying the obsolete session ID and return HTTP 404. No OS is specified.
Findings
- Reported cause: xyonium says the client retains its cached session ID and throws on 404 instead of starting another handshake. A transport close/reconnect or process restart is the reported recovery. The issue remains open; the author asks maintainers whether recovery should renegotiate the protocol era or repeat the original era's handshake (#3056).
- Separate source inspection: sattyamjjain's October 20 comment traces commit 9bc40e9: the successful handshake sets the ID, 404 reaches an SDK HTTP error, and termination clears the ID. This supports the lifecycle diagnosis through code inspection; it is not a second runtime reproduction.
- Replay is not established: sattyamjjain explicitly labels catching a 404, reconnecting and replaying once as untested. The comment does not establish retry safety for a tool with side effects. Ben-Home's October 21 comment is hidden as spam in GitHub's web view, but its API-readable text discusses recovery design rather than reporting another runtime reproduction (discussion, replay proposal).
- Release status: the official October 23 TypeScript SDK 2.4.0 notes describe a separate modern per-request transport revision-binding change. They do not announce stale-session 404 recovery. The open report and these notes establish no released repair for this case; they also do not establish a runtime reproduction on 2.4.0.
Limits
One runtime reporter and an independent source-code analysis, with no OS specified. The case concerns stateful session-ID connections; it does not establish the same failure for stateless negotiation. The proposed call replay is untested, and the cited release notes are not evidence that all later clients retain the 2.0.0 behavior (#3056).
Not for: missing session headers or unacceptable response formats during setup; see mcp-streamable-http-400-missing-session-id-406-not-acceptable.
Started from a post by @felixweinberger, packaged by the editor. Original post