[BUG] MCP Streamable HTTP SSE reconnection regressed in 2.1.83
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Since upgrading from 2.1.81 to 2.1.83, MCP connections via Streamable HTTP transport drop every ~60 seconds and the MCP status changes to "needs authentication" instead of silently reconnecting. The MCP dialog shows only "Authenticate" and "Disable" options -- the "Reconnect" option that was previously available is gone.
The SSE GET stream (/api/private/mcp) is terminated by the AWS ALB idle timeout (60s) because the MCP SDK's StreamableHTTPServerTransport sends no keepalive/heartbeat data on the SSE channel between tool calls. This has always been the case, but 2.1.81 handled it gracefully -- when the SSE stream dropped, it silently re-established the connection with the same mcp-session-id header. In 2.1.83, the dropped SSE stream is treated as a full disconnection requiring re-authentication.
The server-side session is still valid (the mcp-session-id still exists in the server's transport map), but Claude Code discards it and forces a full re-initialization cycle.
What Should Happen?
When the SSE GET stream drops (e.g. due to ALB/proxy idle timeout), Claude Code should:
- Re-establish the GET SSE stream with the same
mcp-session-idheader - Continue using the existing session without dropping to "needs authentication"
- Show "Reconnect" in the MCP dialog rather than only "Authenticate"
This is how 2.1.81 behaved.
Error Messages/Logs
Steps to Reproduce
- Configure an MCP server with Streamable HTTP transport behind an AWS ALB (or any reverse proxy with a 60s idle timeout):
``json``
{
"mcpServers": {
"my-server": {
"type": "http",
"url": "https://my-server.example.com/api/private/mcp",
"headers": {
"X-Username": "user@example.com",
"X-API-Hash": "<hash>"
}
}
}
}
- Connect to the MCP server via
/mcp-- connection establishes successfully
- Use an MCP tool (e.g.
about()) -- works fine
- Wait ~60 seconds without making another tool call (or let Claude think/respond for >60s between tool calls)
- Try to use another MCP tool -- it fails with "No such tool available" and the MCP status shows "needs authentication"
- Must manually
/mcpand disable and reenable. (Option to reconnect is not there only Authenticate.)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.81
Claude Code Version
2.1.83 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗