remote-control environments expire every ~10 minutes, causing session churn and iOS disconnections

Resolved 💬 3 comments Opened Mar 10, 2026 by sheynkman Closed Mar 14, 2026

Bug Description

claude remote-control environments are garbage-collected server-side every ~10 minutes with Error: Environment env_XXXX not found, even while the remote-control process is actively connected and waiting for clients. Each reconnection creates a new environment + session, which:

  1. Adds a new session to the iOS/web sidebar on every cycle
  2. Drops any active iOS connection since the old environment is gone
  3. Makes the feature effectively unusable for persistent remote access

Reproduction

  1. Run claude remote-control --name 'My Machine' on a Mac
  2. Leave it running (no client connected)
  3. After ~10 minutes: Error: Environment env_XXXX not found → process exits
  4. If auto-restarted, a new environment is created → new sidebar entry
  5. If a client WAS connected, it gets disconnected

Evidence

99 restarts over 4 days (Mar 6–10), with consistent ~10 minute cycling:

Mon Mar  9 21:09:04: remote-control exited
Mon Mar  9 21:29:23: remote-control exited
Mon Mar  9 21:39:42: remote-control exited
Mon Mar  9 21:50:00: remote-control exited
Mon Mar  9 22:00:19: remote-control exited
Mon Mar  9 22:10:38: remote-control exited
Mon Mar  9 22:20:56: remote-control exited
...  (continues every ~10 min all night)

Error pattern is always the same:

[10:17:22] Error: Environment env_01Kvmdjmjw7Z1MdQsfbXz9KQ not found.
[10:17:22] Shutting down 1 active session(s)…

Expected Behavior

  • Environments should persist as long as the remote-control process is running
  • If an environment expires, reconnection should reuse the same session rather than creating a new one
  • Active iOS/web client connections should not be silently dropped

Environment

  • Claude Code: 2.1.70
  • macOS: 26.3.1 (Darwin 25.3.0, Apple Silicon)
  • Setup: claude remote-control launched via launchd + tmux with auto-restart loop

View original on GitHub ↗

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