Remote Control: ghost sessions persist after restart, no cleanup mechanism

Resolved 💬 6 comments Opened Mar 30, 2026 by Ganan Closed May 14, 2026

Problem

When the claude remote-control process restarts (due to crash, network issues, or manual restart), a new "My Mac" entry is registered in the claude.ai/code UI, but old/stale ones are never cleaned up. They persist indefinitely as disconnected sessions.

There is no CLI command, API, or UI option to deregister or remove stale sessions.

Reproduction

  1. Run claude remote-control --name "My Mac"
  2. Kill the process (pkill -f "claude remote-control")
  3. Run claude remote-control --name "My Mac" again
  4. Observe two "My Mac" entries in claude.ai/code — the old one is stale but never disappears

Impact

This is especially problematic for users running watchdog scripts that auto-restart remote-control on crash. Each restart adds another ghost entry. After several restarts, 10+ stale "My Mac" entries accumulate in the UI, making it confusing and unusable.

Feature requests

  1. Auto-cleanup: Server should automatically remove sessions that have been disconnected for more than N minutes
  2. CLI cleanup command: e.g. claude remote-control --cleanup to deregister old sessions
  3. UI cleanup: Allow users to manually dismiss/remove stale sessions from the claude.ai/code UI
  4. Session reuse: When restarting remote-control with the same --name, reuse the existing server registration instead of creating a new one

Environment

  • Claude Code CLI (latest, installed via Homebrew)
  • macOS (Mac Studio)
  • Running remote-control as a persistent service with watchdog

View original on GitHub ↗

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