Remote Control: disabling from the Desktop app toggle always throws "Cannot read properties of undefined (reading 'session_url')"
Summary
In the Claude Desktop app, turning Remote Control off for a session fails every time with an unhandled TypeError. The toggle reverts, an error toast appears, and Remote Control stays enabled. Enabling works normally; only the disable path fails.
The error text is the same as the one in #78933 and #78482, but this is a third failure mode: the connection establishes successfully and stays up, and the crash happens only when disabling. No /compact was involved.
Environment
- Claude Desktop app:
1.24012.9 - Claude Code:
2.1.219 - OS: macOS (Darwin 25.5.0)
- Session host: Desktop app (
entrypoint: claude-desktop) - Auth: claude.ai OAuth, no
ANTHROPIC_API_KEYorANTHROPIC_BASE_URLset - "Enable remote control by default" is on. Remote Control enables automatically about one second after session start, with no user action.
Steps to reproduce
- With Settings → Claude Code → Enable remote control by default on, start a Claude Code session hosted by the Desktop app. Remote Control connects on its own at session start.
- Let the session run normally for a few hours.
- Use the in-app control to turn Remote Control off for that session.
Actual behavior
The toggle fails and Remote Control remains enabled. Every retry fails identically. From ~/Library/Logs/Claude/main.log, with IDs redacted:
08:36:32 [info] Enabling remote control for session local_<redacted>
08:36:33 [info] [remote-control] bridge_state: ready
08:36:33 [info] Remote control enabled: https://claude.ai/code/session_<redacted>
08:36:33 [info] [remote-control] bridge_state: connected
13:55:39 [info] LocalSessions.toggleRemoteControl: sessionId=local_<redacted> enable=false
13:55:39 [info] Disabling remote control for session local_<redacted>
13:55:39 [error] Failed to toggle remote control for local_<redacted>: Cannot read properties of undefined (reading 'session_url')
That three-line disable sequence repeats verbatim at 13:57:22, 13:58:51 and 13:58:52. There is no successful disable in the log, and no Enabling remote control line afterwards, so the session is left connected with no way to disconnect it from the UI.
Note the asymmetry: the enable path at 08:36 succeeded and produced a working session URL. Whatever object the disable path dereferences for session_url is undefined even though the session connected normally and has a valid remote session URL.
Expected behavior
Turning the toggle off disables Remote Control for that session. Failing that, the error is handled rather than thrown, and the UI state reflects reality instead of reverting.
Related mobile symptoms
Observed on the same session, in the Claude iOS app, and possibly the same root cause:
- The session appeared in the Code list under the process-level derived name (of the form
<cwd-basename>-<suffix>) instead of its conversation title. - It was listed as archived, while the Desktop app's own local record for that session had
"isArchived": false. - Unarchiving it from mobile made it vanish from the list entirely, appearing in neither the archived nor the active view.
- Opening the session in the Desktop app corrected the title on mobile.
Step 4 matches #30691. Steps 1 through 3 look like a distinct archive-state divergence between the mobile client and the local session record, which I did not find covered in an existing issue.
Related issues
- #78933 — same error text, but the connection never establishes at all
- #78482 — same error text, triggered by
/compact; also reports unstable remote session URLs across app restarts when "Enable remote control by default" is on - #30691 — mobile list does not show sessions until the session URL is opened manually
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗