[BUG] winget install succeeds but fails to create link — binary stranded in WinGet packages cache

Status Open
Reported on v2.1.168
Maintainer reply None cached
Activity 3 comments · opened Jun 7, 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?

winget install Anthropic.ClaudeCode reported "Successfully installed" and downloaded the binary (240MB), but:

  • WinGet\Links\claude.exe — not created
  • ~\.local\bin\claude.exe — not created
  • ~\.local\bin was already in PATH

The binary was stranded at:
%LOCALAPPDATA%\Microsoft\WinGet\Packages\Anthropic.ClaudeCode_Microsoft.Winget.Source_8wekyb3d8bbwe\claude.exe

What Should Happen?

Claude Code should create symlinks or copies at WinGet\Links\claude.exe or ~/.local/bin/claude.exe so that the CLI is on PATH and usable after winget install, not leave the binary only in the package cache.

Error Messages/Logs

Steps to Reproduce

  1. On Windows (PowerShell), run: winget install Anthropic.ClaudeCode
  2. Wait for installation to succeed ("Successfully installed")
  3. Confirm that no claude.exe is found in WinGet\Links or ~/.local/bin
  4. Check %LOCALAPPDATA%\Microsoft\WinGet\Packages\Anthropic.ClaudeCode_Microsoft.Winget.Source_8wekyb3d8bbwe\ for a stranded claude.exe binary

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.168

Platform

Other

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Workaround: Manually copy the binary to ~/.local/bin/claude.exe or to a directory in PATH, e.g.:

powershell
Copy-Item "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\Anthropic.ClaudeCode_Microsoft.Winget.Source_8wekyb3d8bbwe\claude.exe" "$env:USERPROFILE\.local\bin\claude.exe"

Related: #27867

View original on GitHub ↗

3 Comments

stevenhedrick · 2 months ago

Just ran into the same problem. In my case it was from running winget upgrade Anthropic.ClaudeCode on a working installation. ClaudeCode CLI suggests running this command to you every time the installed version is out of date.

Performing the same workaround from the initial comment fixed my Claude cli.

Chinoncombattecade · 2 months ago

Happened to me today.

> PS C:\Users\username> winget upgrade Anthropic.ClaudeCode
> Found Claude Code [Anthropic.ClaudeCode] Version 2.1.197
> This application is licensed to you by its owner.
> Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
> Downloading https://downloads.claude.ai/claude-code-releases/2.1.197/win32-x64/claude.exe
>   ██████████████████████████████   225 MB /  225 MB
> Successfully verified installer hash
> Starting package install...
> Command line alias added: "claude"
> Successfully installed
> PS C:\Users\username> claude
> claude: The term 'claude' is not recognized as a name of a cmdlet, function, script file, or executable program.
> Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Mr1008 · 1 month ago

I confirm it also affects my installation