[BUG] Remote Control: session permanently loses sync after disconnection — /rc cannot restore within same session
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a Remote Control session disconnects (likely triggered by PC sleep, possibly context compaction or network interruption), the remote client (claude.ai/code or iOS app) cannot resync with the session. Reconnecting from the session list shows only the conversation history up to the point of disconnection — messages exchanged after that point are missing.
Critically, running /rc within the same session to re-establish Remote Control does not fix the issue. The remote client continues to show stale state. The only workaround is to start an entirely new session.
Environment
- Platform: macOS
- Claude Code version: 2.1.72 (native installation)
- Remote client: claude.ai/code (browser) / Claude iOS app
- Plan: Max
- Settings:
CLAUDE_CODE_ENABLE_REMOTE_CONTROL=1,bypassPermissionsmode
Related Issues
- #28571 — Remote control session fails to resync after connection drop
- #28532 — Frequent disconnections requiring page refresh
- #32727 — Frequent disconnections every 20-60 min on v2.1.71
- #29219 — Connection fails to reconnect after rate limit resets
What Should Happen?
After disconnection and reconnection, the remote client should display the full conversation including messages exchanged after the disconnection point.
Additionally, running /rc within the same session should successfully re-establish a working Remote Control connection, syncing the remote client to the current session state.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session with Remote Control enabled (
CLAUDE_CODE_ENABLE_REMOTE_CONTROL=1in settings.json) - Connect from a remote client (claude.ai/code or Claude iOS app)
- Allow the PC to sleep (or continue working until the remote client disconnects — cause may also be context compaction or network interruption)
- Wake PC / return to local terminal — the local session continues working normally
- Continue exchanging messages in the local terminal
- Attempt to reconnect from the remote client by tapping the session in the session list
- Observe: the remote client shows conversation only up to the disconnection point — newer messages are missing
- Run
/rcin the local terminal to re-establish Remote Control - Observe: the remote client still shows stale state —
/rcdoes not restore sync within the same session
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗