Remote control: add keepalive/auto-reconnect for mobile sessions
Resolved 💬 2 comments Opened Mar 7, 2026 by stephenchen408 Closed Apr 5, 2026
Problem
When using /remote-control to connect from a mobile device (iPhone), the session drops frequently due to network instability. After disconnection, the user must manually:
- Go to the host terminal
- Disconnect remote control
- Reconnect remote control
- The new session on the phone has no context of what was displayed before
This makes mobile usage unreliable for longer conversations.
Proposed Solution
Add a keepalive/heartbeat mechanism to the remote control protocol so the connection stays alive, or auto-reconnects when it drops. Options:
- Server-side heartbeat — periodic ping to keep the WebSocket/connection alive
- Auto-reconnect — detect disconnection and automatically re-establish the session
- Session resumption — when reconnecting, replay the last N messages so the user has context on the new session
Workaround Attempted
Tried automating disconnect/reconnect from a separate terminal, but /remote-control is a slash command inside the Claude Code session, not an external CLI command, so it can't be scripted from outside.
Environment
- Host: Windows 11
- Client: iPhone (Claude iOS app / browser)
- Claude Code CLI
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗