[BUG] Windows: Desktop App execution alias shadows Claude Code CLI in PATH

Resolved 💬 3 comments Opened Feb 11, 2026 by GBA63 Closed Feb 11, 2026

Bug Description

After installing (or updating) the Claude Desktop App on Windows, running claude in PowerShell/Terminal launches the Electron Desktop App instead of Claude Code CLI. This causes disk cache errors, V8 OOM crashes, and makes the CLI unusable from the terminal.

Root Cause

Windows creates an App Execution Alias at C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\Claude.exe which takes priority over the Claude Code CLI at C:\Users\<user>\.local\bin\claude.exe in the PATH.

When claude is typed in the terminal, Windows resolves to the Desktop App alias first, launching the Electron app in a terminal context where it encounters cache permission issues and crashes.

Symptoms

(node:44888) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
[35960:0211/064601.548:ERROR:net\disk_cache\cache_util_win.cc:25] Unable to move the cache: Zugriff verweigert (0x5)
[35960:0211/064601.548:ERROR:net\disk_cache\disk_cache.cc:236] Unable to create cache

In some cases, it escalates to a V8 OOM crash:

[12620:0211/073632.220:ERROR:electron\shell\common\node_bindings.cc:182] OOM error in V8: 
Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

The process starts and immediately exits (or crashes) — no interactive CLI session is created.

Steps to Reproduce

  1. Have Claude Code CLI installed (~\.local\bin\claude.exe, version 2.1.39)
  2. Install or update Claude Desktop App (from Microsoft Store or installer)
  3. Open a new PowerShell/Terminal window
  4. Run claude
  5. Observe: Desktop App launches (with errors) instead of CLI

Verify with:

where.exe claude
# Output shows TWO entries:
# C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\Claude.exe  <-- Desktop alias (wins)
# C:\Users\<user>\.local\bin\claude.exe                           <-- CLI (shadowed)

Workaround

Disable the App Execution Alias for Claude:

Windows Settings → Apps → Advanced App Settings → App Execution Aliases → Claude → OFF

Then restart the terminal. where.exe claude should now only show the CLI path.

The Desktop App can still be launched normally via the Start Menu.

Expected Behavior

  • claude in terminal should always launch Claude Code CLI
  • The Desktop App installer should either not create an App Execution Alias, or name it differently (e.g., claude-desktop)
  • Alternatively, the CLI installer could warn about or handle this conflict

Environment

  • OS: Windows 11 Pro (10.0.26200)
  • Claude Code CLI: 2.1.39 (installed via ~\.local\bin\)
  • Terminal: PowerShell 7.5.4
  • Desktop App: Latest version (as of 2026-02-11)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗