/remote-control disconnect throws "Cannot read properties of undefined (reading 'session_url')"

Status Closed — duplicate
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 30, 2026 · closed Aug 15, 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?

Environment

  • Claude Code: 2.1.220
  • OS: macOS 26.5.2 (Build 25F84), arm64
  • Install method: npm via mise

What's Wrong?

Running /remote-control and then disconnecting throws:

Remote Control failed to disconnect: Cannot read properties of undefined (reading 'session_url')

The error occurs in the disconnect flow. Connecting works fine — only disconnecting is broken.

Steps to Reproduce

  1. Run /remote-control to start a remote control session
  2. Attempt to disconnect the session (e.g., click disconnect in the UI or use the disconnect action)
  3. Error appears: Remote Control failed to disconnect: Cannot read properties of undefined (reading 'session_url')

Expected Behavior

The session disconnects cleanly without error.

Actual Behavior

An uncaught TypeError is thrown because session_url is being read from an undefined object in the disconnect path. The session does not disconnect cleanly.

Additional Context

Prior changelogs mention /remote-control fixes, suggesting this area has seen recent churn. The connect path works correctly; the regression appears isolated to the disconnect handler.

What Should Happen?

The /remote-control session disconnects cleanly without throwing a JavaScript TypeError. The disconnect handler should guard against undefined before accessing session_url.

Error Messages/Logs

Remote Control failed to disconnect: Cannot read properties of undefined (reading 'session_url')

Steps to Reproduce

  1. Open Claude Code (version 2.1.220) on macOS 26.5.2 arm64
  2. Run the /remote-control slash command to start a remote control session
  3. Once the session is active, attempt to disconnect (click the disconnect button / use the disconnect action in the UI)
  4. Observe the error: Remote Control failed to disconnect: Cannot read properties of undefined (reading 'session_url')

Note: Connection/start works correctly. The error is isolated to the disconnect path.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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