[BUG] MCP Streamable HTTP SSE reconnection regressed in 2.1.83

Resolved 💬 5 comments Opened Mar 25, 2026 by mgjohnston Closed Apr 24, 2026

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:

  1. Re-establish the GET SSE stream with the same mcp-session-id header
  2. Continue using the existing session without dropping to "needs authentication"
  3. Show "Reconnect" in the MCP dialog rather than only "Authenticate"

This is how 2.1.81 behaved.

Error Messages/Logs

Steps to Reproduce

  1. 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>"
}
}
}
}
``

  1. Connect to the MCP server via /mcp -- connection establishes successfully
  1. Use an MCP tool (e.g. about()) -- works fine
  1. Wait ~60 seconds without making another tool call (or let Claude think/respond for >60s between tool calls)
  1. Try to use another MCP tool -- it fails with "No such tool available" and the MCP status shows "needs authentication"
  1. Must manually /mcp and 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_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗