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
- Run
claude remote-control --name "My Mac" - Kill the process (
pkill -f "claude remote-control") - Run
claude remote-control --name "My Mac"again - 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
- Auto-cleanup: Server should automatically remove sessions that have been disconnected for more than N minutes
- CLI cleanup command: e.g.
claude remote-control --cleanupto deregister old sessions - UI cleanup: Allow users to manually dismiss/remove stale sessions from the claude.ai/code UI
- 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
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗