claude-code - 💡(How to fix) Fix Remote Control sessions show in 'Other' instead of correct project folder in Desktop app

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Property/desktop sessionRemote Control session
Session ID formatlocal_<uuid>session_<id>
Initialization pathFull (trust + permissions + git)Partial (git check only)
Session file in Desktop storeYes (with cwd, originCwd)No
CWD known to DesktopYesYes
Project groupedYesNo → "Other"

Code Example

[CCD] LocalSessions.setFocusedSession: sessionId=session_01VrUWfg<redacted>
LocalSessions.checkGhAvailable: cwd=<project_dir>

---

[CCD] LocalSessions.getDefaultPermissionMode: cwd=<project_dir>
LocalSessions.checkTrust: cwd=<project_dir>
LocalSessions.checkGhAvailable: cwd=<project_dir>
RAW_BUFFERClick to expand / collapse

Bug Description

When a CLI session is connected to the Desktop app via Remote Control (/remote-control or claude://code/<bridgeSessionId>), it appears in the "Other" project folder in the sidebar. The same session opened via /desktop correctly appears under its project folder.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code CLI: v2.1.143
  • Claude Desktop: Store package v1.7196.0.0 (MSIX)
  • Working directory: Non-git project directory

Steps to Reproduce

  1. Start a CLI session in a non-git project directory with remoteControlAtStartup: true
  2. Connect via Remote Control (session appears in Desktop sidebar under "Other")
  3. From the same CLI session, run /desktop (session appears under the correct project folder)

Root Cause (from Desktop main.log)

The two handoff paths run different initialization logic:

Remote Control (bridge session):

[CCD] LocalSessions.setFocusedSession: sessionId=session_01VrUWfg<redacted>
LocalSessions.checkGhAvailable: cwd=<project_dir>

Only checkGhAvailable runs. The session is focused under its bridge ID (session_*) but never gets a local_* identity or project binding.

/desktop (local session):

[CCD] LocalSessions.getDefaultPermissionMode: cwd=<project_dir>
LocalSessions.checkTrust: cwd=<project_dir>
LocalSessions.checkGhAvailable: cwd=<project_dir>

Full initialization → creates local_* session file with cwd/originCwd → project grouping logic fires.

Key evidence: The Desktop app DOES know the CWD for bridge sessions (logged in checkGhAvailable), but never uses it for project categorization.

Analysis

Property/desktop sessionRemote Control session
Session ID formatlocal_<uuid>session_<id>
Initialization pathFull (trust + permissions + git)Partial (git check only)
Session file in Desktop storeYes (with cwd, originCwd)No
CWD known to DesktopYesYes
Project groupedYesNo → "Other"

Expected Behavior

Remote Control sessions should be grouped into the same project folder as they would be via /desktop, since the CWD is already available.

Suggested Fix

When the Desktop app focuses a bridge session via setFocusedSession(session_*):

  1. Read the CWD (already available — used in checkGhAvailable)
  2. Apply the same project-grouping logic used for local_* sessions (git-root or CWD-path fallback)
  3. Display the session under the resolved project folder, not "Other"

The data is already there — it's a missing code path, not missing metadata.

Additional Context

Also observed: claudeURLHandler: unrecognized code path { pathname: '/<bridgeSessionId>' } when launching via claude://code/<bridgeId>. The handler doesn't recognize the bridge session URI format, but the buddy bridge still picks it up and connects. Fixing the URL handler to explicitly route bridge session URIs would make the connection cleaner.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Remote Control sessions show in 'Other' instead of correct project folder in Desktop app