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
MCP SSE client hangs indefinitely on dropped connection #26368
When using an MCP server over SSE transport (e.g., via Tailscale to a remote host), if the network connection drops mid-session, Claude Code hangs indefinitely when it next tries to call an MCP tool. The user must press Esc to cancel and manually reconnect the MCP server.
Steps to Reproduce
Configure an MCP server with SSE transport (e.g., claude mcp add mem0-local --transport sse http://remote-host:8050/sse)
Start a conversation and use MCP tools successfully
Cause a network interruption (Tailscale hiccup, Wi-Fi drop, server restart, etc.)
Try to use an MCP tool again — Claude Code hangs with no timeout or error
Expected Behavior
MCP tool call should timeout after a reasonable period (e.g., 30-60s)
Claude Code should display an error like "MCP server unreachable" and offer to reconnect
Ideally: automatic reconnection attempt before failing
Actual Behavior
Claude Code blocks indefinitely waiting for a response on the dead SSE connection
No timeout, no error message
User must press Esc to cancel, then manually reconnect the MCP (/mcp → reconnect)
Root Cause Analysis
TCP keepalive defaults on macOS are ~2 hours, so the OS doesn't detect the dead connection quickly
The MCP SSE client doesn't implement any request-level timeout
No SSE heartbeat/keepalive detection on the client side
Server-side SSE keepalive pings can help the server detect dead clients, but don't fix the client hanging
Environment
Claude Code CLI (latest)
macOS (Sequoia 15.3)
MCP server: SSE transport over Tailscale VPN
Reproducible with any SSE MCP server when network drops
Suggested Fix
Add a configurable timeout to MCP tool calls over SSE (default ~30-60s)
Detect stale SSE connections (e.g., expect periodic keepalive events)
Auto-reconnect on connection failure before returning error to user
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Feb 17, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
github-actions commentedon Feb 21, 2026
This issue has been automatically closed as a duplicate of #18557.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
github-actions commentedon Mar 1, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.