Remote Control: session shows "environment was deleted" after server exit; no way to re-attach to a new environment

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 11, 2026

Summary

After a claude remote-control (server mode) process exits following a network outage, sessions it was serving show "This session's environment was deleted — Start a new session to keep working." in claude.ai/code / the desktop app. The conversation is still visible, but the session can't be continued, and there is no way to resurrect it into a new environment even though the full transcript still exists locally.

Steps to reproduce

  1. Run claude remote-control (server mode) as a systemd user service with several sessions (7/32 in my case).
  2. Lose network (wifi beacon loss) for >10 min. Per the docs, server mode gives up after ~10 min and the process exits (it exited with code 0).
  3. Restart the service ~7 hours later (claude remote-control, same directory).
  4. Open the old sessions in claude.ai/code or the desktop app.

Actual

  • Old sessions are listed but show "This session's environment was deleted. Start a new session to keep working." with no way to continue.
  • The restarted server registers a new environment and serves only a fresh session; the old sessions are not attached to it.

Expected

  • If the session is merely archived/disconnected (its history is still stored server-side and the transcript still exists locally), I should be able to re-attach it to a new environment, e.g. via an explicit "Resume in new environment" action, or claude remote-control --session-id <id> binding the session to the current environment.
  • At minimum, the UI should say why the environment was deleted and what the recovery options are.

Notes

  • The local transcripts under ~/.claude/projects/<project>/*.jsonl are intact, so claude --resume works locally, but the claude.ai-side session cannot be re-linked.
  • Exit code 0 on giving up after the outage makes Restart=on-failure in systemd not restart the service (I worked around this in a wrapper script). Server mode exiting non-zero when it gives up would help; a related but separate point.
  • Related: #93345.

Version: Claude Code 2.1.296, Linux (Ubuntu), systemd user unit.

View original on GitHub ↗