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
InspectorClient.disconnect() never terminates a Streamable HTTP session (no DELETE) #2924
InspectorClient.disconnect() (core/mcp/inspectorClient.ts) closes the SDK client and its local streams but never calls the Streamable HTTP transport's terminateSession(), so no DELETE with the Mcp-Session-Id reaches the server. The spec says a client that no longer needs a session SHOULD send one. A stateful server therefore keeps every session the Inspector opened until its own idle cleanup runs.
This affects every surface that disconnects: web, TUI, CLI and mcpdo. Load testing makes it most visible. --load-connections leaves N server-side sessions behind per run, and --load-churn (#2912, PR #2923) leaves one behind for every session it opens and closes. On a server with a session cap, that exhausts the cap instead of exercising teardown.
Expected
On disconnect over Streamable HTTP with a session id, send the session-terminating DELETE (best effort: a 405 from a server that does not support it is fine, and other failures must not block local cleanup), then close.
Notes
Raised by the Copilot review on PR #2923 (#2923 (comment)). It was declined there as out of scope, because this is pre-existing InspectorClient behavior shared by all surfaces, not something the churn mode introduced. Once fixed, the load engine's churn closeFailed count will pick up termination failures automatically, because it counts a throwing disconnect().
Activity
cliffhall commentedon Nov 5, 2026
Triage: Priority Medium (total 6)
buglabelcliffhall commentedon Nov 5, 2026
Fixed by #2926 (merged into v2/main as 2a1fb91).
fix(core): terminate the Streamable HTTP session on disconnect (model…