[BUG] Desktop SSH remote: server upgrade on reconnect kills running sessions (server.shutdown → killed child process groups)

Status Closed — duplicate
Reported on v2.1.289
Maintainer reply None cached
Activity 2 comments · opened Oct 7, 2026 · closed Oct 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (related but distinct: #94887, which covers Desktop-hosted tools failing while the laptop sleeps)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

In Claude Desktop's SSH remote mode, running sessions on the remote host are killed when Desktop replaces its remote server after an auto-update.

Desktop auto-updated overnight and uploaded a new remote server and CLI to the host (~/.claude/remote/srv/<new-hash>/, ~/.claude/remote/ccd-cli/2.1.289). The old server (started 3 days earlier) kept running with two active sessions. When the Mac next reconnected, Desktop sent server.shutdown over RPC to the old server, which killed every child process group. Both sessions died mid-work. One had an active background CI watch and a pending action. Neither came back on its own. The transcript was intact, but the session showed as disconnected / computer_unreachable and had to be resumed by hand.

There was no warning, no wait for the sessions to go idle, and no handover to the new server. From the user's side, a session "on the server" died because the laptop client woke up.

What Should Happen?

Upgrading the remote server should not kill running sessions. Any of these would work:

  • keep the old server alive until its sessions end, and start new sessions on the new server
  • defer the upgrade until there are no active sessions, or ask first
  • at minimum, warn the user ("2 running sessions will be stopped") and automatically resume the sessions on the new server afterwards

Error Messages/Logs

~/.claude/remote/run/<id>/remote-server.log.old (old server):

2026/10/07 06:02:51 [Server] Connection closed: @
2026/10/07 06:06:39 [Server] New connection from: @
2026/10/07 06:06:39 [Server] Connection closed: @
2026/10/07 06:06:40 [Server] New connection from: @
2026/10/07 06:06:40 [ServerHandler] server.shutdown received over RPC
2026/10/07 06:06:40 [Server] shutdown requested
2026/10/07 06:06:40 [Server] Connection closed: @
2026/10/07 06:06:40 [Server] cleanup: closed 1 connection(s), killed 2 child process group(s)

New server log starts at the same second:

2026/10/07 06:06:40 [daemon] child processes will start with an open-files limit of 65536
Claude remote server listening on ~/.claude/remote/run/<id>/rpc.sock (pid 77073, ...)

Files on the host:

~/.claude/remote/srv/89cb6289...   2026-10-04 14:39   (old server, ran until the kill)
~/.claude/remote/srv/5fd08069...   2026-10-06 22:17   (new server)
~/.claude/remote/ccd-cli/2.1.288   2026-10-05
~/.claude/remote/ccd-cli/2.1.289   2026-10-06 22:17

Both affected sessions' Remote Control records show last_init_error: {error_kind: "computer_unreachable", recoverable: "true"} about 60 s after the kill.

Before the kill, while the Mac was asleep (05:46–05:53), Desktop-provided tools (mcp__ccd_session__spawn_task, Desktop's Slack connector) failed with PreToolUse hook did not respond before its timeout (host client may be unreachable), while Bash kept working. That part is #94887. I mention it only because it makes this failure look like "the session died when the laptop slept", when the actual kill came later, from the upgrade.

Steps to Reproduce

  1. In Claude Desktop (macOS), connect to a Linux host in SSH remote mode and start a session that runs for a long time (e.g. a background gh pr checks --watch).
  2. Let Desktop auto-update to a version that ships a new remote server, while the session is still running and the Mac is asleep or disconnected.
  3. Wake the Mac / reconnect.
  4. Desktop sends server.shutdown to the old server, and the running session's process is killed (killed N child process group(s) in remote-server.log.old).

Claude Model

Not model-related

Is this a regression?

I don't know

Claude Code Version

CLI on host 2.1.288 → 2.1.289 (Desktop-managed ccd-cli); latest Claude Desktop for macOS as of 2026-10-07

Platform

Anthropic API

Operating System

Remote host: Ubuntu Linux (kernel 6.8); client: macOS (Claude Desktop)

Terminal/Shell

Claude Desktop app (SSH remote mode)

View original on GitHub ↗

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