/desktop command fails on Windows Store (MSIX) installation
Bug Description
The /desktop slash command fails with "Failed to open Claude Desktop. Please try opening it manually." when Claude Desktop is installed via the Microsoft Store (MSIX package) on Windows.
Environment
- OS: Windows 11 Pro 10.0.26200
- Claude Code CLI: v2.1.143 (installed at
~\.local\bin\claude.exe) - Claude Desktop: Microsoft Store package
Claude_1.7196.0.0_x64__pzs8sxrjxfjjc - Remote Control: Enabled and working (mobile app connects successfully)
Steps to Reproduce
- Install Claude Desktop from the Microsoft Store
- Start a Claude Code CLI session with
remoteControlAtStartup: true - Run
/desktopin the CLI session - Observe: "Failed to open Claude Desktop. Please try opening it manually."
Root Cause
The /desktop command likely searches for the Desktop app at a traditional install path (e.g., %LOCALAPPDATA%\Programs\Claude\Claude.exe), which doesn't exist for MSIX/Store installations. The Store app is at:
C:\Program Files\WindowsApps\Claude_1.7196.0.0_x64__pzs8sxrjxfjjc\app\Claude.exe
This path is not directly launchable via Start-Process for Store apps.
Working Workaround
The Claude Desktop MSIX package registers the claude:// protocol handler. Launching via protocol URI works perfectly:
# Read the bridge session ID from the active session file
$session = Get-Content "$env:USERPROFILE\.claude\sessions\<PID>.json" | ConvertFrom-Json
Start-Process "claude://code/$($session.bridgeSessionId)"
This correctly opens the CLI session in the Desktop app with full Remote Control functionality.
Proposed Fix
The /desktop command should fall back to the claude://code/<bridgeSessionId> protocol handler when:
- The Desktop executable is not found at the expected path, OR
- The platform is Windows and the Store package is detected (
Get-AppxPackage -Name "Claude")
The protocol handler approach is more robust across all installation methods (Store, traditional installer, and Chocolatey/Scoop) since it delegates app resolution to the OS.
Additional Context
- The
claude://protocol is registered in the MSIX manifest as<uap3:Protocol Name="claude" Parameters="%1" /> - The app's AUMID is
Claude_pzs8sxrjxfjjc!Claude - Mobile Remote Control works correctly (same
bridgeSessionId), confirming the issue is solely in how/desktoplocates/launches the app
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update: Full Workaround Found
The shim approach fixes both
/desktopAND the Desktop app's local session discovery (Remote Control showing CLI sessions in the sidebar).Fix
Compile a minimal protocol-forwarding executable and place it where the CLI expects:
Compile with .NET Framework (available on all Windows installs):
Then create the registry entry the CLI uses for discovery:
Why this works
The Claude Code CLI (and Desktop's
LocalSessionsdiscovery) look for a Claude Desktop installation via:%LOCALAPPDATA%\Programs\claude-desktop\Claude.exe)HKCU:\...\Uninstall\Claude→InstallLocation)The MSIX Store package doesn't create either of these. The 3KB shim executable just forwards to the
claude://protocol handler that the Store app DOES register, bridging the gap.Additional finding
This also fixes the Desktop app's ability to discover and display active CLI sessions via Remote Control in the sidebar — not just the
/desktophandoff command. The Desktop's local session trust check appears to depend on finding the CLI installation at a known path.Confirming this bug is still present on the latest Claude Code and Claude Desktop as of 2026-05-25 — over a week after #61194 was filed and auto-closed as a duplicate of this thread.
Environment
Claude_1.8555.2.0_x64__pzs8sxrjxfjjc(installed via the.exeinstaller from https://claude.ai/download — which delivers as MSIX)Symptom
/desktop→Error: Failed to open Claude Desktop. Please try opening it manually.Verified working alternatives on the same machine (so install + protocol handler are healthy, the CLI launcher is the broken piece):
Start-Process "claude://"→ opens the appStart-Process "shell:AppsFolder\Claude_pzs8sxrjxfjjc!Claude"→ opens the appThe MSIX-aware diagnosis in this issue still matches current behaviour exactly. The official installer at https://claude.ai/download continues to deliver Claude Desktop as an MSIX package, so every new Windows install hits this immediately on first
/desktop.Still reproducing on Claude Code v2.1.161 with the Microsoft Store (MSIX) Claude Desktop build, confirming this is still open. Adding the decompiled
/desktopflow for the current CLI version plus some test data, in case it helps narrow the fix.Environment
Claude_<version>_x64__pzs8sxrjxfjjc, installed underC:\Program Files\WindowsApps\…, AUMIDClaude_pzs8sxrjxfjjc!Claude%LOCALAPPDATA%\AnthropicClaudedoes not exist./desktop→Error: Failed to open Claude Desktop. Please try opening it manually.Decompiled
/desktopflow in v2.1.161 (Windows path)The Windows path is a registry existence check + a
claude://deep-link launch (no exe-path lookup at launch time):So on a Store install:
ueq()passes (the bareHKCR\claudeURL Protocolstub exists), andC55()returns null (no%LOCALAPPDATA%\AnthropicClaude), someq()returns{status:"ready", version:"unknown"}and the version gate is skipped. Execution reachesb55(), whose success is solelycode === 0fromcmd /c start "" "<deep link>".Test data (manual reproduction of
b55's launch)On the same machine, with Desktop fully closed each time:
| Command | Exit | Result |
|---|---|---|
|
Start-Process "claude://"| 0 | Desktop launches ||
Start-Process "claude://resume?session=<GUID>"| 0 | Desktop launches ||
cmd /c start "" "claude://resume?session=<GUID>"(exactb55form) | 0 | Desktop launches |i.e. the
claude://protocol activation works for the MSIX build (consistent with @Baouse's report above), andb55's exact command returns exit 0 and opens the app when run by hand. Yet/desktopfrom inside the CLI still reports failure. So the failing step is not the protocol itself —b55ought to returntruehere, which points at the launch happening in a different runtime context inside the CLI (the detached session/daemon process) where thecmdspawn returns non-zero, or at an earlier discovery step than the one in this decompiled path.This lines up with @jbk1998's diagnosis that the CLI (and Desktop's local-session discovery) expect a Claude Desktop install at a known path /
HKCU\…\Uninstall\ClaudeInstallLocation, neither of which the MSIX package creates — and that the shim + registry entry fixes both/desktopand the sidebar session discovery.Suggested fix (CLI side)
Get-AppxPackage -Name Claude) and activate via AUMID (Claude_pzs8sxrjxfjjc!Claude) when the standard path/registry discovery fails, instead of reporting a hard failure.b55reports a non-zero exit but theclaude://protocol resolves to a packaged handler, fall back to AUMID activation rather than surfacing "Failed to open."Happy to provide more of the decompiled trace or run additional diagnostics if useful.
Root cause isn't path detection - the install/version check passes (I get "Failed to open", not "not installed"). It's the opener: the
claude://deep link has multiple query params joined by&, and it's opened viaspawnSync('cmd', ['/c','start','',url]).cmd.exetreats&as a command separator (argv quoting doesn't escape it), so the URL is split, the tail runs as bogus commands, andcmdexits 1 → "Failed to open".Repro:
Note: the MSIX app already handles
claude:// natively, so the registry-shim workarounds don't help -startbreaks on&before the URL is ever dispatched.Fix: open the URL without
cmdparsing - e.g.rundll32 url,OpenURL <url>(already used elsewhere in the codebase for browser links) orShellExecute, or just escape&. Same diagnosis as #26197, which was stale-closed without a fix.Confirming this is still broken on the latest version.
Claude Code: 2.1.162 (native install)
Claude Desktop: MSIX / Microsoft Store install — package family Claude_pzs8sxrjxfjjc (AppUserModelID Claude_pzs8sxrjxfjjc!Claude)
OS: Windows 11
Shell: Windows Terminal (PowerShell)
/desktop fails with "Failed to open Claude Desktop. Please try opening it manually." every time, even when Claude Desktop is already installed, running, and opens fine manually. It fails at the launch/detection step, so the session is never handed off.
Ruled out on my machine: outdated CLI (on latest 2.1.162), broken Desktop (launches fine), and AV/EDR interference (0 interceptions, nothing blocked).
The Win32 path detection misses MSIX installs. A fallback to the registered claude:// protocol handler (ShellExecute / Start-Process "claude://...") would fix it for Store installs.
Reproducible on my setup as well — adding diagnostics that may help narrow it down.
Environment:
Claude_1.17377.2.0_x64__pzs8sxrjxfjjc(InstallLocation underC:\Program Files\WindowsApps)Get-AppxPackageshows the identical PackageFullName, so there is no non-MSIX install path to fall back to on this machine.Symptoms:
/desktopalways fails withFailed to open Claude Desktop. Please try opening it manually.— including when the desktop app is already running.What does work (potential fix directions):
Start-Process "claude://"launches/foregrounds the app fineexplorer.exe shell:AppsFolder\Claude_pzs8sxrjxfjjc!Claudeworks tooHKCU:\Software\Classes\claudeexists but has noshell\open\command(URI activation is handled by the MSIX manifest, not the classic registry command) — if the CLI resolves the handler via the registry command or a hardcoded exe path, that would explain the failureclaude-cli://maps to%USERPROFILE%\.local\bin\claude.exe --handle-uri "%1"as expectedFalling back to
ShellExecuteon theclaude://URI (letting Windows route it through MSIX URI activation) would likely fix this for Store/MSIX installs.