Remote control: disconnect throws "Cannot read properties of undefined (reading 'session_url')" after code 4090 takeover

Status Closed — duplicate
Maintainer reply None cached
Activity 1 comment · opened Jul 18, 2026 · closed Aug 15, 2026

Repro: enable remote control on a Claude Code desktop session (Windows 11). Open the same session from claude.ai on a phone - the desktop logs 'Transport closed: this connection is no longer the active worker for the session (code 4090)'. Then toggle remote control OFF on the desktop.

Result: error toast 'Failed to toggle remote control: Cannot read properties of undefined (reading session_url)'.

Analysis: on the code-4090 takeover the app appears to drop its remote-session record but leaves the UI toggle in the connected state, so the disconnect handler dereferences an undefined session object when reading session_url. Evidence in %APPDATA%\Claude\logs\main.log (Jul 16 x2, Jul 18 x3). Harmless beyond the toast; a null-guard on the disconnect path or syncing toggle state on 4090 would fix it.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗