SSH remote session disconnects immediately — Epoch mismatch 409 loop
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?
Environment:
Claude Desktop for Mac version 1.1.9310
Claude Code on remote server: 2.1.86
Server: Hetzner VPS, Ubuntu, SSH key authentication
Connection: SSH with private key /Users/fs/.ssh/id_ed25519
What's wrong:
SSH remote sessions in the Code tab connect for less than a second then immediately disconnect. The session shows "Disconnesso" (Disconnected) right after connecting.
Log error (main.log):
[error] [transport:ccr] Epoch mismatch (409), invoking onEpochMismatch handler
[info] [transport:bridge] epoch superseded (409) — closing for poll-loop recovery
[info] [sessions-bridge] Transport permanently closed — code=4090
[info] [sessions-bridge] Reconnecting transport (attempt 1/6)
This loops 6 times then gives up.
What worked before:
SSH sessions worked correctly before updating to version 1.1.9310 approximately 5 days ago.
What still works:
SSH connection from VS Code Remote-SSH works fine
SSH connection from terminal works fine
claude mcp serve runs correctly on the server
What Should Happen?
Claude code desktop should connect to SSH, as it did prior the update of the desktop app (it was working regularly). I use Meshnet nordvpn
Error Messages/Logs
Steps to Reproduce
Environment:
Claude Desktop for Mac version 1.1.9310
Claude Code on remote server: 2.1.86
Server: Hetzner VPS, Ubuntu, SSH key authentication
Connection: SSH with private key /Users/fs/.ssh/id_ed25519
What's wrong:
SSH remote sessions in the Code tab connect for less than a second then immediately disconnect. The session shows "Disconnesso" (Disconnected) right after connecting.
Log error (main.log):
[error] [transport:ccr] Epoch mismatch (409), invoking onEpochMismatch handler
[info] [transport:bridge] epoch superseded (409) — closing for poll-loop recovery
[info] [sessions-bridge] Transport permanently closed — code=4090
[info] [sessions-bridge] Reconnecting transport (attempt 1/6)
This loops 6 times then gives up.
What worked before:
SSH sessions worked correctly before updating to version 1.1.9310 approximately 5 days ago.
What still works:
SSH connection from VS Code Remote-SSH works fine
SSH connection from terminal works fine
claude mcp serve runs correctly on the server
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗