[BUG] /branch leaves the original conversation's Remote Control reconnection record pointing at the branch's session

Status Open
Reported on v2.1.267
Maintainer reply None cached
Activity 0 comments · opened Sep 10, 2026

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 conversation with Remote Control active is branched with /branch, the Remote Control connection follows the process into the new branch — but the original conversation's reconnection record is left pointing at that same remote session.

As a result, resuming the original conversation in another terminal is blocked:

Remote Control not started here · another Claude Code on this machine (started 1h ago) already has Remote Control for this conversation, so this terminal can't see your sessions on other machines and they can't reach it · run /remote-control to move it to this terminal

The message is misleading: the process it refers to is no longer serving that conversation at all — it moved to the branch when /branch ran.

Running /remote-control in the new terminal does take the session over (the branch's terminal correctly shows Remote Control disconnected — another connection took over this session (code 4090)), and messages sent from claude.ai/code are then handled by the correct process. But the remote session keeps the branch's title, so the session list at claude.ai/code shows the original conversation under the branch's name. A manual /rename from the CLI is needed to correct it.

Net effect: with N terminals running, only N-1 sessions appear in the session list, and one of them is labelled with the wrong conversation's name.

What Should Happen?

One of the following:

  1. /branch clears the original conversation's reconnection record when the Remote Control connection moves to the branch, so resuming the original starts a clean Remote Control session; or
  2. /branch leaves Remote Control with the original conversation and starts the branch without it; or
  3. At minimum, the "another Claude Code on this machine already has Remote Control for this conversation" notice should not fire when the holding process has since moved to a different conversation.

Additionally, when a remote session is taken over by a process serving a different conversation, the remote session title should be updated to that conversation's title rather than keeping the previous one.

Error Messages/Logs

# Terminal B, after `claude --resume <original>`:
● Remote Control not started here · another Claude Code on this machine (started 1h ago) already has
  Remote Control for this conversation, so this terminal can't see your sessions on other machines
  and they can't reach it · run /remote-control to move it to this terminal

# Terminal A (the one that ran /branch), after Terminal B ran /remote-control:
● Remote Control disconnected — another connection took over this session (usually another device or
  Claude Code session) — this device is standing down (code 4090)

# Terminal A footer indicator:
  /rc failed

Steps to Reproduce

  1. In terminal A, resume a conversation and enable Remote Control:

Confirm the session appears at claude.ai/code under conversation A's title.

  1. In the same terminal A, branch the conversation:

Claude Code switches terminal A into the new branch (SESSION_B). The remote session's title at claude.ai/code changes to "Some Branch Name". Terminal A still shows /rc active.

  1. In terminal B, resume the original conversation:

→ The "Remote Control not started here · another Claude Code on this machine ... already has Remote Control for this conversation" notice appears, and Remote Control is left off. But no process is serving SESSION_A at this point — terminal A moved to SESSION_B in step 2.

  1. In terminal B, run /remote-control.

→ Terminal B connects and terminal A is disconnected with code 4090.
→ Sending a message from claude.ai/code is now handled by terminal B (verified with pwd).
→ But the session in the list is still titled "Some Branch Name", not conversation A's title.

  1. Note that the session list now shows one fewer session than the number of running Claude Code processes, and one entry carries the wrong title. Running /rename <A's title> from terminal B corrects the title.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.267

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Environment: 4 concurrent Claude Code processes, each in its own tmux session on the same Debian machine. Verified with ps -eo pid,ppid,etime,args that exactly 4 claude processes were running and no stray fifth process held the session.

Confirmed which process was actually serving the remote session by sending pwd from claude.ai/code and checking which tmux pane received it via tmux capture-pane.

The docs page for Remote Control documents takeover behaviour and the "resume in a second terminal" notice, but does not describe how /branch interacts with an active Remote Control connection or with the original conversation's reconnection record.

View original on GitHub ↗