Skip to content

[BUG] Remote Control: session permanently loses sync after disconnection — /rc cannot restore within same session #34531

Description

@ml-kz-h

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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, bypassPermissions mode

Related Issues

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

  1. Start a Claude Code session with Remote Control enabled (CLAUDE_CODE_ENABLE_REMOTE_CONTROL=1 in settings.json)
  2. Connect from a remote client (claude.ai/code or Claude iOS app)
  3. Allow the PC to sleep (or continue working until the remote client disconnects — cause may also be context compaction or network interruption)
  4. Wake PC / return to local terminal — the local session continues working normally
  5. Continue exchanging messages in the local terminal
  6. Attempt to reconnect from the remote client by tapping the session in the session list
  7. Observe: the remote client shows conversation only up to the disconnection point — newer messages are missing
  8. Run /rc in the local terminal to re-establish Remote Control
  9. Observe: the remote client still shows stale state — /rc does 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions