[BUG] Remote Control: 'session_url' undefined recurs per-project and survives restart — only fixed by recreating the project in a new folder

Status Fixed / completed
Reported on v2.1.138
Maintainer reply None cached
Activity 0 comments · opened Jul 22, 2026 · closed Aug 25, 2026

Preflight Checklist

  • [x] I have searched existing issues. The session_url crash itself is already tracked (#77915, #78336, #78484, #78786, #78933). I'm filing this separately because none of them report the per-project scoping or the folder-recreation workaround below, which point at persisted per-project state rather than a transient toggle/UI bug. Happy to have it folded into one of those if maintainers see it as the same root cause.
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Remote Control periodically breaks with:

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

The part I haven't seen reported yet is how it is scoped and how it is recovered:

  • The breakage affects one single project, not the whole app or the account. Other projects on the same machine, same account, same app instance keep working normally at the same time.
  • Once a project enters this state, it stays broken across app restarts (and machine reboots). Restarting is not enough.
  • The only thing that reliably brings it back is abandoning the project directory: I move/recreate the project in a different folder and re-add it. Remote Control then works again for that project — until it eventually breaks again, days later.

This pattern (survives restart + scoped to one project + fixed only by using a new path) suggests some per-project persisted record (session/bridge state keyed by project path) is left in a corrupt or orphaned state, and nothing in the app detects or resets it. The path appears to be the key, since re-creating the same project at a new location is what clears it.

What Should Happen?

Two things, ideally:

  1. The disconnect path should fail safe — guard the undefined session object instead of throwing, so a missing/stale session can't poison the state.
  2. A corrupted or orphaned project-scoped session record should be detected and reset automatically (or be clearable from the UI / a command), so recovery never requires relocating a real project directory.

Steps to Reproduce

I don't have a deterministic trigger — it appears after normal use over time, which is exactly why I'm emphasizing the scoping and the recovery instead of an exact repro:

  1. Use Remote Control normally on a project (Windows desktop app).
  2. Keep using it across several sessions/days.
  3. Eventually the error above starts appearing for that project.
  4. Restart the app (and the machine) → that project still fails.
  5. Open a different project → Remote Control works fine there.
  6. Recreate the affected project in a new folder and re-add it → works again.
  7. After some time, it happens again.

Error Messages/Logs

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

Environment

| | |
|---|---|
| Claude Code | 2.1.138 |
| OS | Windows 11 Pro (build 26200) |
| Surface | Claude desktop app |

Why this matters

The workaround is disruptive: relocating a real project directory just to restore a client-side feature is a poor trade, and it has to be repeated every time the state rots. A null guard on the disconnect path plus a way to reset the per-project session record would make this fully recoverable in place.

View original on GitHub ↗