[BUG] Remote Control: automatic reconnection doesn't work -- connection drops silently with no recovery
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?
Problem
Remote Control (/remote-control) silently drops the connection to the Claude iOS app (Code tab) during long sessions. Once dropped, the mobile client becomes completely unresponsive -- messages don't go through and there's no indication on either side that the connection is dead.
The core issue is that the built-in reconnection doesn't work. The connection drops and never recovers on its own. The only fix is to physically walk to the terminal and manually:
Run /remote-control
Select "Disconnect this session" from the interactive TUI menu
Run /remote-control [session-name] again
Notably, this manual disconnect/reconnect cycle always works -- the connection comes back healthy every time after cycling it. This suggests the reconnection logic itself isn't broken at the protocol level; something in the automatic recovery path is failing to trigger what a manual disconnect/reconnect does successfully. The fix may be as straightforward as having the auto-reconnect perform the same teardown/re-establish cycle that the manual flow does.
This defeats the entire purpose of remote control. If you're away from your desk -- which is the whole point of the feature -- you're locked out until you can physically get back to the machine.
The real fix
Remote Control's automatic reconnection needs to actually work. When the connection drops, Claude Code should detect the failure and re-establish the connection automatically, with no manual intervention required. This is the expected behavior for any persistent remote connection (SSH keep-alive, WebSocket reconnect, etc.).
The connection should be resilient to:
Network interruptions (WiFi switching, cellular handoffs)
iOS app backgrounding and foregrounding
Idle timeouts
Transient server-side disconnects
Why CLI flags alone wouldn't solve this
Adding flags like --restart or --reconnect would be nice for scripting, but they don't actually address the problem: you can't type commands when you're not at the computer. That's the whole reason you're using remote control in the first place. The fix has to be automatic.
Workarounds considered (none viable)
Custom slash commands / skills: Can't trigger built-in CLI commands like /remote-control from within a conversation or custom command.
tmux + scripted keystrokes: Theoretically possible (run Claude Code inside tmux, have a cron send keystrokes to disconnect/reconnect), but extremely brittle -- depends on exact TUI menu state, cursor position, timing. Not a real solution.
Cron-based reconnect: Would require non-interactive CLI flags that don't exist (/remote-control --disconnect, /remote-control --reconnect). Even if they did, it's a band-aid for what should be built-in behavior.
Nice-to-haves (secondary to the main fix)
If automatic reconnection is hard to ship immediately, these would at least unblock workarounds:
Non-interactive CLI flags: /remote-control --restart to cycle the connection from a script, enabling cron-based keep-alive
Connection health signal: A heartbeat or status indicator so external tools can detect a dead connection and attempt recovery
Mobile-side indication: Show the user on the iOS app that the connection dropped, instead of silently failing
Use case
I run long Claude Code sessions (hours to a full day) and manage them remotely from my iPhone via the Code tab. This is an incredibly powerful workflow when it works -- I can manage development, run automations, check on projects, all from my phone. But the silent connection drops make it unreliable for anything beyond a few minutes, which undermines the feature entirely.
Environment
Claude Code (CLI)
macOS (Apple Silicon)
Remote client: Claude iOS app, Code tab
Connection typically drops after 15-60 minutes of use
What Should Happen?
Remote Control's automatic reconnection needs to actually work. When the connection drops, Claude Code should detect the failure and re-establish the connection automatically, with no manual intervention required. This is the expected behavior for any persistent remote connection (SSH keep-alive, WebSocket reconnect, etc.).
The connection should be resilient to:
Network interruptions (WiFi switching, cellular handoffs)
iOS app backgrounding and foregrounding
Idle timeouts
Transient server-side disconnects
Error Messages/Logs
Steps to Reproduce
Leave a /remote-control session running and watch it fail to reconnect after a few hours.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
56 Comments
+1 on @BluCreator issue. Same version of Claude Code / model / iTerm2 and same behavior.
Terminal window shows 'Remote Control reconnecting'. Running /remote-control does not correct the failed connection.
Continuing the session from the iTerm2 does not result in reconnecting the session.
I have the same issue
Confirming we're seeing this too on Linux (Oracle Cloud, RHEL/aarch64). Two independent sessions disconnect at identical timestamps, confirming server-side. Client stops reconnecting after the 3rd drop (1002 protocol error). No viable workaround — the loop-restart approach doesn't help since it generates a new session each time, requiring manual reconnect on the phone anyway.
Reproducing this on WSL2 + iOS — v2.1.76
Environment
/remote-control, connect from phoneSymptoms
/remote-control→ select Disconnect → type/remote-controlagain → Connect. This requires physical access to the PC terminal, which defeats the purpose of remote control.Frequency
Impact
This makes Remote Control unusable for its intended purpose (continuing work from mobile away from desk). Every disconnect requires physically going back to the PC to restart the connection.
Suggested improvements
/remote-controltoggleSystemd keep-alive watchdog workaround for Linux users
Hitting this consistently on Linux (v2.1.81): after a period of idle, the
service loses its connection to Anthropic's bridge and never recovers. The
mobile app shows the session as active but messages are never processed.
How we detect the stuck state:
Instead of counting log lines (unreliable — normal operation also generates ~1
line/sec), we check whether the process has an active ESTAB TCP connection to
Anthropic's servers on port 443. No connection = stuck.
Watchdog script (~/.local/bin/claude-remote-watchdog.sh):
#!/bin/bash
SERVICES=("claude-remote.service" "claude-remote-ha.service")
for SERVICE in "${SERVICES[@]}"; do
PID=$(systemctl --user show "$SERVICE" --property=MainPID --value
2>/dev/null)
STATE_FILE="/tmp/claude-watchdog-${SERVICE}.fail"
if [ -z "$PID" ] || [ "$PID" = "0" ]; then
rm -f "$STATE_FILE"
continue
fi
CONNECTIONS=$(ss -tnp | grep "pid=$PID," | grep "ESTAB" | grep ":443" | wc
-l)
if [ "$CONNECTIONS" -eq 0 ]; then
if [ -f "$STATE_FILE" ]; then
echo "$(date): $SERVICE has had no connection for 2 checks (~10
min) — restarting"
rm -f "$STATE_FILE"
systemctl --user restart "$SERVICE"
else
echo "$(date): $SERVICE no connection — waiting for next check"
touch "$STATE_FILE"
fi
else
rm -f "$STATE_FILE"
fi
done
systemd timer (runs every 5 minutes):
[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
Important caveats:
process to reconnect naturally after a transient NAT/idle timeout — avoiding
unnecessary session loss
this is a last resort, not a real fix
often results in a broken/empty session on the mobile side — so the real issue
is the bridge session not surviving long idle periods end-to-end
A proper fix in the reconnection logic (or bridge session persistence) would be
much preferred over any client-side workaround.
I'm seeing the same exact issue on multiple machines. No network disruption.
Environment Info
This is not the documented 10-minute network timeout. The local machine remains online, and the CLI process is still running. The disconnect appears to be triggered by something else — possibly an idle timeout, a transient server-side drop, or a cellular/WiFi handoff on the mobile side — but the root cause is unknown because no diagnostic information is surfaced.
Observed Behavior
Confirming this also occurs on Linux (Ubuntu 22.04 on Azure VM). Same symptoms: silent disconnection after extended session, no auto-recovery, manual disconnect/reconnect cycle fixes it.
same issue by the time I'm ready to use my remote connection in iOS it's bad/stale; rendering the feature not very useful
It appears that this phenomenon is widespread and requires urgent improvement.
Exactly the same happens on Windows 10 running in Windows Teminal/Powershell 7 and Android on the mobile side.
same issue mac os VM with tmux session
Same issue. Windows 11, Windows Terminal, Claude Code 2.1.81, Android app. Session shows "Remote Control reconnecting" and never recovers. Manual disconnect/reconnect from terminal always fixes it, but that defeats the purpose of remote control.
Sharing a workaround that's been working reliably for me, based on @henrikalthofknudsen's systemd watchdog idea — adapted for tmux with direct TUI-level auto-reconnect instead of process restart.
<img width="1716" height="332" alt="Image" src="https://github.com/user-attachments/assets/b63f77f8-ec09-44dd-bc15-4226acd6fa8a" />
TL;DR: Use tmux + a watchdog script to detect dead sessions and automatically cycle
/remote-controlviatmux send-keys.How it works:
I manage all my Claude Code sessions in tmux panes. The watchdog script runs on a loop (every 5 minutes via Claude Code's
/loopcommand, or standalone via cron) and:tmux capture-paneto read the status barRemote Control reconnecting(the stuck/dead state)tmux send-keysto cycle the connection:Ctrl+C→ clear prompt/remote-control→ navigate to "Disconnect this session" → Enter/remote-control→ auto-connects to a fresh bridge sessionThe key insight is that the
/remote-controlTUI menu defaults the cursor to "Continue" (the last item), so the script sendsUp Up Enterto reach "Disconnect this session". After disconnecting, running/remote-controlagain auto-connects without showing the TUI menu. This preserves the existing session and conversation history (unlike a full process restart).Usage (inside Claude Code):
Or standalone via cron:
Repo: https://github.com/Sma1lboy/claude-remote-watchdog
Caveats: Requires tmux (sessions must run inside tmux panes). The TUI keystroke timing (
STEP_WAIT=5) may need adjustment on slower machines. This is a workaround for the symptom, not the root cause — would love to see proper auto-reconnection built into Claude Code.+1 seeing the same behavior on macos TUI
Same issue on Windows 11. Updated claude code yesterday so version is current. Seems to happen right around the 4 hour mark for me, consistently.
Hitting this with Obsidian CLI + Claude Code Channels on macOS (Terminal CLI). Connection drops silently after a few minutes of idle — no error, no reconnect attempt. The Obsidian CLI skill (/savethis) stops responding as a result, which breaks the whole vault integration workflow. try /status or
Same issue here. Would love to have it open all day!
Encountering the same issue here ✋
Same issue with Linux. I once had it running for 12 hours. Next session it only worked for 30 mins.
Same issue - is there any way to retrieve the session context? RIght now it seems like my entire session is read only and claude has no way to access it
Same issue here using MacOS... it's really painful because I'm working a lot remotely using mobile devices with multiple sessions and when they get disconnected all the session progress is lost (I do some workarounds but idk if is there any built in way to recover the session).
I love using remote control but this is very annoying.
FYI, this appears next to me by downloading the latest version of Claude desktop on macOS as well as the latest version of Claude on iOS. hope that helps others as well!
+1
This is genuinely frustrating. Remote control is one of the most exciting features of Claude Code, but the constant silent disconnections make it practically unusable for its intended purpose. The whole point is to work away from the terminal, but you end up having to walk back to the machine to manually cycle the connection every time it drops. Huge downer when I'm far away.
In the last week, it has been a much improved experience for me. I can go several days now without interruption.
The two main issues I've notice
The last one I see much more rarely now.
Same issue here. Running Claude Code in a dedicated
screensession on a headless Ubuntu server. When I come back after a period of inactivity, thescreensession and Claude Code process are both alive and fully responsive (I can attach and continue directly). However, the remote-control connection has dropped silently — no error, no indication it disconnected — and the web interface is completely unresponsive. The only recovery is SSH-ing into the server and restartingclaude remote-controlmanually.Setup: Claude Code in
screenon a Linux server, connecting viaclaude.ai/codein browser.Symptom: Remote-control silently dies during inactivity. No reconnection attempt visible on either side.
Workaround:
claude remote-controlrestart after SSH reconnect.Would really benefit from either automatic reconnection when the browser tab reconnects, or at least a visible "connection lost" indicator so you know to restart rather than wondering if your messages are just slow.
Remote control is a great feature but this bug makes it almost impossible to use
.
Is it possible to prioritize a fix ?
This is absolute garbage. I'm on the go right now, and all my sessions are disconnected. AS ALWAYS! Damn it.
+1
+1
I've noticed people are having this bug 2 months ago.
As said - it's an amazing feature. Please try to prioritize this bug.
Does somebody know any workaround for the moment?
Session disconnected after switching networks or waiting a night.
It's been a couple of weeks that I don't see this issue anymore. Maybe they solved the problem ?
Nope. It still happens daily for me.
Same thing on Linux (Hostinger VPS, Ubuntu 24.04), Claude Code 2.1.139, Node 22, Max sub. Fresh auth via
claude auth login --claudeai.Process registers fine, does exactly ONE /work/poll request that returns "no work, 1 consecutive empty polls", then complete silence. Process stays alive but strace shows almost no syscalls (15 reads + 1 write per 5sec), TCP to anthropic stays ESTABLISHED, no further HTTP traffic. Messages sent from claude.ai/code never reach the VPS, browser keeps showing "Remote Control disconnected".
Tried the nuclear cleanup: killed all claude processes, rm -rf /root/.claude/, fresh login, single tmux session running just claude remote-control. Also requested server-side session cleanup via "Delete saved sessions" in settings. Same behavior. Reproduces identically on 2.1.138 and 2.1.139.
Last log line before going quiet:
[bridge:api] GET .../work/poll -> 200 (no work, 1 consecutive empty polls)
Issue is labeled platform:ios/macos but Linux behaves identically.
+1, reporting in from Hetzner Cloud (Germany 🇩🇪) — Ubuntu 24.04 server running
claude remote-control --spawn worktree, RC 2.1.139, with the iOS app as my only mobile interface from China 🥺Hit the exact symptom described in OP last night (UTC 2026-05-11 16:00–23:00, a 7-hour outage):
claude-remote.servicestayedactiveto systemd the whole windowoom_kill 0,oom 0systemctl restart claude-remote.servicebrought it backBuilt an out-of-band watchdog as a stopgap, since I can't physically reach my server from another country:
api.anthropic.comIPsapi.anthropic.com:443→systemctl restart claude-remoteafter 3 consecutive failuresIt works, but having to write infra-side recovery for what should be a small reconnect loop in the daemon is honestly pretty sad 🥺 This issue has been open since March 2026 and every long-running remote workflow silently breaks because of it — please bump this up the queue 🙏
Happy to share the watchdog scripts if anyone wants them as a stopgap while waiting for the real fix.
Please share, this sound like the best workaround so far. 🙏
You guys raised a trillion dollar , fix it !
Consistently a problem here as well. Using both android and web as remote clients
The tmux watchdog workaround above is useful, but I think there are two different recovery models getting mixed together here:
tmux/terminal session as the durable work surface, and make mobile attach to that same live process through a separate control surface.The first model is what Claude Code should fix natively: heartbeat, accurate connected/disconnected state, non-interactive reconnect, and a stable session identity that survives transient relay drops. A mobile UI that still says “active” while the host-side bridge is dead is the failure mode that burns user trust.
The second model is the workaround class I’ve been building around in Faryo: https://github.com/Snailflyer/faryo
Faryo is not a fix for Claude Remote Control reconnect, and it does not make the official bridge more stable. It keeps Claude Code/Codex/shell inside a named
tmuxsession and gives phone/desktop browsers a lightweight workbench for output review, short input, approve/interrupt, and handoff back into the same session. In other words, the durable handle is the tmux session, not the RC URL.For people already running Claude Code in tmux or systemd, that distinction matters: if the official bridge silently dies but the local process is still alive, you need either a reliable bridge reconnect or an independent way to reach the same live process. Both are valid; they just solve different parts of the failure.
Running Remote Control as a systemd service on a VPS. The process kept dying silently - in my case the Linux OOM killer was the cause. The default Type=oneshot + RemainAfterExit=yes setup made it worse because systemd still reported "active" even though the process was long gone. From the mobile app it just looked like the silent disconnect described here.
What I changed: added swap to reduce OOM kills, switched the service to Type=simple with a wrapper script that monitors the tmux session, and added Restart=on-failure so systemd actually restarts it when it dies. Early days, but seems more robust so far.
Same repro on Windows + Claude Code desktop app + Claude Android app:
enableRemoteControl=trueset in~/.claude.jsonClaude Code v2.1.150. Same behavior with v2.1.149.
The community fix (claude-remote-watchdog + tmux) works but only in a Linux/tmux env — it cannot monitor the Claude desktop Electron app's session state, so users on the desktop app are stuck waiting for an upstream fix.
Would help to have: (a) a working auto-reconnect, or (b) a Reconnect button in the mobile app, or (c) a way to query session health from outside the desktop app so a Windows-side watchdog can be built.
Root cause identified:
epoch superseded (409)+ no auto-recovery after teardownI've been debugging this exact problem across 5 rounds of investigation over the past week, with full
--debug-filelogs. Here's the root cause and a concrete fix proposal.The failure path (from debug logs)
When the mobile app reconnects to a session (due to network change, app backgrounding/foregrounding, or lock screen wake), the server creates a new epoch for that session. The desktop client's old epoch becomes invalid:
After teardown, the bridge is permanently dead. The process continues running (API calls work), but RC never recovers. The only fix is manually running
/remote-controlin the terminal.Evidence that auto-recovery is already feasible
In the same incident, a session that was NOT hit by epoch supersede performed a proactive refresh that seamlessly upgraded its epoch — proving the client already has this capability:
The
proactive refreshpath gets a new epoch and rebuilds the transport with zero downtime. The teardown path just... gives up.Key finding: epoch supersede is per-session, not per-identity
The mobile app does NOT supersede all sessions at once — only the specific sessions it reconnects to. In one observed incident with 3 active RC sessions:
epoch superseded (409)within ~1 minute of each other (06:21 and 06:22 UTC)This makes the behavior unpredictable: "some sessions disconnect, some don't" with no user-visible reason.
Proposed fix
After
epoch superseded (409)triggers teardown, the client should automatically attempt to re-establish the bridge using the same mechanism asproactive refresh(with exponential backoff on failure), instead of permanently giving up.Environment
/remote-control--debug-filevia a wrapper scriptI think this problem might be created when i rename a chat session within my Desktop Claude program as well. I tried the "/remote-control [session name]" fix above, using the new name after renaming a session that was "disconnected," but on my iPhone it merely says "(no content)" on the first line and then a blank line...then below that "Remote Control connecting..." and it does nothing...
Also, when I use claude-code from the command line and run "/remote-control Yancey, Keith" it automatically shows two sessions with my Claude Code desktop application:
<img width="143" height="89" alt="Image" src="https://github.com/user-attachments/assets/d0448da0-651c-4bbb-bd45-08d73731044c" />
And here's what it says in Claude CLI:
<img width="829" height="78" alt="Image" src="https://github.com/user-attachments/assets/8bc53d0d-7c34-416c-aad0-476649769a96" />
I'm not sure if it does this because I previously renamed the session within the desktop application or what...In other words...
1) Start session with "remote control" enabled in settings...
2) The session is renamed before or after it officially disconnects (not sure which)...
3) It disconnects and for some unknown reason and isn't available on my phone...
4) Based on the advice above, I use the "/remote-control" command to restart it...
5) It creates a new session with an identical name within the desktop application, as you can see in my image above...
Perplexing...Please fix because it defeats the entire purpose of this awesome feature!
Attempted is multiple times...notice the different session identifiers at the end of the string for the two sessions...this despite the same session name of "Yancey, Keith"....
<img width="859" height="204" alt="Image" src="https://github.com/user-attachments/assets/509e16c1-3e27-43b6-beb3-81364da53384" />
Might have something to do with this...
Same issue here. I activate /remote-control, and when connecting from the app it just shows "Remote Control connecting…" indefinitely. Messages I send don't go through at all. I tried disconnecting and reconnecting the session but it didn't help.
Is anyone from Anthropic actually going to respond to our messages on here or what? lol. You'd figure that they'd have an LLM monitoring issues like these to provide good customer service. ;-)
Another aspect here is I have multiple remote control sessions and they all disconnect. If I reconnect one of them they will all reconnect.
Yup - literally just ran into this issue on Windows desktop app and trying to reconnect to a session from iOS.
Hit this on CLI 2.1.173 (macOS 25.3.0 / Apple Silicon) running
claude remote-controlas a long-lived launchd daemon, and can add some hard diagnostics from catching it in the failed state.Two daemons (
claude remote-control --name X, launchd KeepAlive, started ~16:25) silently lost their connections in the evening (last log writes 16:25 and 18:31) and stayed dead all night. Caught in the act the next morning:lsof -a -p <pid> -i TCP→ zero TCP sockets. The process held only its log files, kqueues, and one unix socket. The websocket was fully gone locally — not half-open.sample <pid>→ main thread idle inkevent64inside the event loop. Not crashed, not spinning — just waiting for events with nothing registered to fire.·✔︎· Connected · Ready.pmset -g log) — so this isn't a sleep/wake artifact. Notably, on nights when the machine does sleep, every dark-wake produces a clean socket error and the daemon logsReconnected after 0seach time. The auto-reconnect only fails when the connection dies while the host stays awake — consistent with the close never surfacing as an event, or the reconnect path silently aborting.So the observable bug state is: process alive and idle, no socket, no reconnect attempt, no log output, UI claims Connected.
launchctl kickstart -k(equivalent to the manual disconnect/reconnect cycle described in the OP) recovers it immediately every time.Workaround for anyone running this as a daemon: a periodic watchdog that treats "process up > 3 min with no ESTABLISHED TCP socket" as zombie and kickstarts only then — that's the one signal that reliably distinguishes this state, since the daemon logs nothing.
Adding a focused note and an architectural angle on top of @zxmsdyz's excellent root-cause work — which deserves far more attention than it's gotten.
**The core defect is that a recoverable event is handled as terminal.** When the mobile client reconnects (network change, app backgrounding, lock-screen wake) the server mints a new epoch; the desktop receives
epoch superseded (409)and, instead of refreshing, runs the teardown chain:The fix surface is small and already present in the codebase: the
proactive refreshpath handles epoch upgrades seamlessly (SSETransport: Stream ended, reconnecting→ new epoch →Transport rebuilt (proactive refresh)). The409-supersede branch just needs to enter that same path instead of tearing down. A409 epoch supersededmeans "a newer epoch exists" — that is a reattach signal, not a shutdown signal.Two things that would reduce the pain even before the real fix lands:
lsof— zero open sockets while the statusline still reads "active" / "reconnecting…" indefinitely. A zombie that looks healthy is the worst failure mode; at minimum the statusline should reflect the dead transport so users don't discover it hours later.Type=oneshot+RemainAfterExit=yesreports the unit "active" after an OOM kill on low-memory hosts.Type=simple+Restart=on-failurewould self-heal that class.For contrast — I run Codex's equivalent remote channel under the same conditions (mobile handoffs, backgrounding, hosts that never sleep) and have never seen a comparable silent death. The difference reads as transport supervision: treat the connection as disposable and reattach transparently — which is exactly what the
proactive refreshpath here already knows how to do; it's simply not wired to the409case.Last, said with respect and as a heavy daily user: this one stings less as a bug than as a response-time signal. It's been open since March, a community member has already done the log-level root-cause analysis, and there's still no maintainer acknowledgement across 46 comments and several duplicates (#33041, #66491, #66255, #61996). The model quality is outstanding — closing the gap on operational responsiveness around it is mostly turnaround, not research, and it's where the day-to-day experience currently trails. 🙂
Also hitting this on Windows, Claude Desktop–embedded Claude Code (Max plan, claude.ai OAuth) — filed #69543 (closed as dup of this). Two points for triage:
platform:windows/area:desktop/area:networking)./remote-controlre-arms it for new sessions (already-dropped ones still need their own/rc). Suggests an account-scoped bridge registration (%APPDATA%\Claude\bridge-state.json) going stale wholesale, not just an SSE transport blip. Full logs in the linked issue.Extra symptom: after the manual /remote-control re-arm, the dead session isn't torn down server-side — the old entry lingers (old name, disconnected) while the re-arm mints a NEW remoteSessionId, so each revived session shows up twice on mobile (stale ghost + live one with updated chat/name).
Data point from a long-running headless deployment that may help separate two failure modes here.
Setup: several
claude remote-controlinstances under systemd (Restart=always) on an always-on Linux box that never sleeps, driven from the Claude macOS/iOS app. v2.1.174.cse_…id, but the only reliable recovery isclaude --resume <on-disk-uuid>in a terminal (or re-opening the exact environment URL). The app's reconnect button tends to drop you into a fresh/empty session, so the conversation appears gone even though the transcript is intact on disk.--resume.Two fixes would cover most headless cases: automatic reconnect/backoff on the relay link (the process is alive — it just needs to re-register), and mirroring the Desktop app's token refresh + backoff instead of treating 401/403 as fatal (#53563). Happy to provide verbose logs across a disconnect.
Same issue, but with a variant worth noting: the CLI loses track of the session entirely, so the manual disconnect/reconnect workaround isn't available.
Symptoms:
/remote-controlon the host does not show a "Disconnect this session" option or any active-session menu — it just starts a new Remote Control session as if none existed. So the CLI side apparently believes there's no active session, while the client side believes the session exists but the bridge died.This suggests the CLI's local session state is being torn down (or orphaned) without any error surfacing in the terminal, which is why auto-reconnect never fires — there's nothing left on the CLI side to reconnect.
Environment: Windows host, connecting from the Claude desktop client, Claude Code (latest at time of writing).
Report Assisted by Claude Opus 4.8
Verified repro: phone-submitted
AskUserQuestion("Other") answer is never committed to the local transcriptAdding a content-level confirmation of the "post-disconnect messages missing" behavior in this issue, with a specific, reproducible trigger. A session was remote-controlled from the mobile app while the PC was briefly offline. The CLI emitted an
AskUserQuestion; I answered on the phone via "Other" (free text). The phone re-rendered the same question (selection ignored), then the remote session disconnected. On PC reconnect, neither the answer nor any later message exists in the local.jsonl— the file ends on the unanswered question. The answer survives only in phone screenshots (attached)._Username redacted as
~; bank-reconciliation session, financial values omitted (metadata only). Timestamps UTC._Environment
| Item | Value |
|---|---|
| Installed CLI (
claude --version) |2.1.198|| CLI that wrote the transcript (record metadata) |
2.1.208(newer than installed) || Entrypoint |
claude-vscode|| OS | Windows 11 Pro 10.0.26200 (
win32) || Remote-control keys in
settings.json| none ||
CLAUDE_CODE_ENABLE_REMOTE_CONTROL| unset || SDK-sourced human prompts (
promptSource:"sdk") | 45 / 59 |Note the anomaly: no explicit remote-control enablement in local config, yet most prompts arrived via the SDK/control channel, and the transcript was written by a newer build than the one installed.
Session
e1cf15da-1587-48d0-9fbc-4c6f5ed773b9AskUserQuestioncalls2026-07-14T07:24:00Z→2026-07-14T17:27:08Z2026-07-15T02:49:38Z— ~9.4 h after the last content timestamp (delayed/async flush)09:46Z; no remote connect/disconnect events recorded (format has no such keys)Findings — confirmed two ways
Structural: the transcript terminates on an unanswered
AskUserQuestion.AskUserQuestion"Overdraft fix", idtoolu_0149g5E4kKiPpRnLQNfpZ3xV,17:27:08.232Z.AskUserQuestioncalls, 7 have on-disk answers; this last one has none. Notool_resultreferences that id, and no user record follows it — only zero-timestamp state snapshots (last-prompt/ai-title/mode).Content: the typed "Other" answer is absent from disk. Distinctive phrases from what I typed on the phone (
prompt advisor,number of sample,1 correct pdf,2 correct excel,two wrong excel,arithmetic check method,any other good solution) return 0 matches in the local.jsonl.Conclusion: an answer typed in the mobile app during the offline window is not persisted to the local session. The tool call stayed pending; the phone UI accepted the response but never committed it back to the CLI session. Unrecoverable from local data.
Reproduction
AskUserQuestion; answer on the phone via "Other" (free text).Expected: the phone-submitted answer is committed to the session and written to the local
.jsonl.Actual: the answer is lost; only the CLI-side question is persisted. The file ends on the pending question.
Environment: Claude Code
2.1.198installed /2.1.208wrote the record, VS Code extension, Windows 11, Pro plan. Screenshots (question + submitted "Other" answer) attached (For context, conversation related to financial documents extraction).<img width="540" height="1170" alt="Image" src="https://github.com/user-attachments/assets/ab036c39-0646-4a26-b42f-54f6de7978f1" /> <img width="540" height="1170" alt="Image" src="https://github.com/user-attachments/assets/29c88c88-3ae8-4229-94b5-6c6bbe0a9e4b" />
Confirming this is still happening on v2.1.210, and adding an environment where the usual culprits are ruled out.
Setup: Windows 11 (build 26200) → Windows Terminal → WSL2 (mirrored networking mode), running claude interactively and driving it from the Claude iOS app via Remote Control. PC is set to never sleep.
Symptom: The Remote Control relay drops on its own after a while. The local claude process is still alive and healthy on the PC — it's only the relay link that dies. The auto-reconnect ("Survive interruptions") does not recover it; the session just sits there un-reachable from the phone. The real pain — no way to recover without physical access to the host: The only documented way to re-arm the relay is typing /remote-control in the PC's terminal. When you're on the phone (the entire point of Remote Control), that's a hard lockout. There's no CLI subcommand, no mobile-app "retry," and server mode behaves identically. My only workaround was installing a full remote-desktop tool on the PC purely so I can reach the terminal from my phone and type /remote-control — which defeats the purpose of the feature. Concrete asks, either of which would fix the lockout:
Also worth revisiting the root cause noted in #32727: the ~10-minute relay polling interval means a brief network blip is enough to declare the session dead. A shorter heartbeat, or a grace/retry window before the server gives up, would prevent most of these drops in the first place.
This issue is compounded by the fact that Remote Control is one of the few features not exposed to the session management tools CC has access to, or through any other interface, so there's no way for us to build our own tools to re-enable Remote Control on those sessions where it died.