Repository navigation
feat: turn Remote Control on in running sessions from ^X V - #383
Merged
Merged
Conversation
^X V now opens a popup: t turns Remote Control on now in the selected session, a in every running session that can take it, and v is the old setting for sessions ccs starts. ccs types `/remote-control <name>` into the session's terminal, through the same checks as a / command from the message box (slashRefusal on the key, typeSlashNow just before the keys), and only into an idle Claude Code session in a terminal with no bridgeSessionId, since with Remote Control on the command opens a menu. Afterwards it waits for bridgeSessionId to appear and says if it didn't. Each session gets a note in its box and a line in the activity log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brtkwr
enabled auto-merge
November 23, 2026 04:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opus 5.5 ✨
What changes
^X Vnow opens a small popup instead of flipping a setting straight away:tturns Remote Control on now in the selected session, under its ccs name, so it shows in the Claude app.adoes the same for every running session that can take it.vis the old^X V: the setting for sessions ccs launches or resumes.Every other
^Xletter is taken (R, C, P and M included), and V already meant Remote Control, so the new actions sit behind it.How it works
Terminal sessions have no non-interactive way in, so ccs types
/remote-control <name>plus Enter into the session's terminal. It uses the same path as a/command from the message box.typeSlashis split intoslashRefusal(the checks made on the key) andtypeSlashNow(finds the terminal, then checks everything again just before the keys).^X Vcalls both, so the checks aren't duplicated.ccs types only when all of these hold:
sessions.StillTheSessionchecks this again immediately before the keys.heldFor).bridgeSessionId. This is checked on the key through the newSessionStat.Remoteflag, and again from the fresh file just before the keys. With Remote Control already on, the command opens a menu that waits for a key.state.SessionName).After typing, ccs polls the session file for up to 15s until
bridgeSessionIdappears, and says so in the session's box if it doesn't. A skipped session gets a grey note saying why. Every session, typed or skipped, gets a line in the activity log.One small behaviour change:
/cmdfrom the message box now refuses background sessions and subagent rows on the key with a clear reason. Before, these failed later with "isn't in iTerm or tmux".Tested
internal/tui/remote_test.go. They cover typing and confirming, typed but not confirmed, and the refusals: already on, turned on between the key and the keys, busy, waiting, turned busy before the keys, another session in the pid, a held prompt, background, app-hosted, no name, Codex. They also coveraskipping a session it can't verify.rc-probe-zx41, in a detached tmux session of its own. I drove a build of this branch with^X Vthent. The session printed/remote-control is active, its session file gainedbridgeSessionIdand stayed idle, and ccs reported it on. A secondtwas refused as already on. The test session is closed.awas never pressed in that run, since it would have reached real sessions.twas refused once with "process couldn't be checked against its session file", even though the popup had just listed the session as ready. The refusal was correct for that moment: the live tick hadn't yet verified the pid. The next press worked.Not tested: sessions after a cswap switch
A session whose history Claude Code suppresses (one started under another organisation, as after a
cswapswitch) may still show a wrong name on the phone. Before this PR, only--remote-control <name>at start was known to get past that, and^X Rrestart does that since v0.187.1 (#382). I haven't tested whether the slash command's name argument gets past it as well. Testing it needs acswapaccount switch, which changes the account for every running session on the machine, so I left it. The README says to use^X Rfor those sessions.Demo
The popup opens only on
^X V, whichdemo/record.pynever presses, so the GIF is unchanged.🤖 Generated with Claude Code