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
fix(gateway): supersede prior same-root session on reconnect
The mcp-remote bridge (Cursor global bridge) opens a fresh mcp-session-id
on every reconnect but always targets one workspace root. rmcp's
streamable-HTTP peers don't reliably flip is_transport_closed() after such
a reconnect, so lazy reaping never removed the stale sessions. They piled
up (observed 24 concurrent for a single bridge client) and every
list_changed fanned out to all of them, exploding the log and pushing the
client into a createClient-timeout reconnect storm.
On register_session, evict any prior session sharing the same (client_id,
resolved workspace root) before inserting the new one, and drop its pinned
root from the resolver registry. Distinct roots — real multi-window
editors — never match, so multi-window routing is preserved. Clients that
route via probed roots (no X-Mcpmux-Workspace header) have no root at
registration time and are left untouched.
Signed-off-by: crimsonsunset <jsangio1@gmail.com>
0 commit comments