Claude Code · Windows

Claude Code errors on Windows: 'claude' is not recognized, fsSL, irm, && and WinGet

Capiva · October 29, 2026 · 14 min read

Most Claude Code errors on Windows have one of three causes. The folder %USERPROFILE%\.local\bin is not in your PATH, the install command ran in the wrong shell, or an update left claude.exe missing. Find the message you see in the table below and apply its fix. Then open a new terminal and run claude --version. A working install prints a version number such as 2.1.211 (Claude Code).

This page starts where the Windows install guide ends. You ran the installer, or Claude Code updated itself, and something failed. Each fix comes from the official install troubleshooting page, the advanced setup docs, issues in the anthropics/claude-code repository and Microsoft's PowerShell, WinGet and WSL docs. We read all of them on October 29, 2026. We did not reproduce every error on a Windows machine for this page, so each message appears as its source prints it.

The troubleshooting page changes often. Check the date of each source at the end before you rely on a version number. On macOS or Linux, use How to install Claude Code on macOS and Linux instead.

Match the first line of your error to a row. Each row has its own section below.

MessageWhere it appearsCause
'claude' is not recognized as an internal or external commandCMD%USERPROFILE%\.local\bin is not in PATH, or an update removed claude.exe
The term 'claude' is not recognized as the name of a cmdletPowerShellThe same two causes
Native installation exists but ... is not in your PATHInstaller outputThe installer does not change PATH
A parameter cannot be found that matches parameter name 'fsSL'Windows PowerShellThe macOS and Linux command
'irm' is not recognizedCMDThe PowerShell command
The token '&&' is not a valid statement separatorWindows PowerShell 5.1The CMD command
The term 'System.Xml.XmlDocument' is not recognized or < was unexpected at this timePowerShell or CMDThe install URL returned a page instead of the script
Claude Code does not support 32-bit WindowsWindows PowerShell (x86)A 32-bit PowerShell window
The process cannot access the file ... being used by another processPowerShellAnother installer or an antivirus holds the download
Claude Code on Windows requires either Git for Windows (for bash) or PowerShellClaude CodeNeither shell was found
running scripts is disabled on this systemPowerShellThe execution policy blocks the npm launchers
cannot execute binary file: Exec format errorWSL 1A known regression of the native binary on WSL 1

Why does Windows say 'claude' is not recognized after you install it?

These two messages mean the same thing. Windows looked for claude in every folder listed in PATH and did not find it. The first comes from CMD, the second from PowerShell.

'claude' is not recognized as an internal or external command

claude : The term 'claude' is not recognized as the name of a cmdlet

The native installer puts claude.exe in %USERPROFILE%\.local\bin and does not add that folder to PATH. It says so at the end of the install, under Setup notes:. This is the full note as quoted in issue #86999, on version 2.1.233:

⚠ Setup notes:
  ● Native installation exists but C:\Users\<user>\.local\bin is not in your PATH. Add it by
    opening: System Properties → Environment Variables → Edit User PATH → New → Add the path
    above. Then restart your terminal.

First, confirm that the file exists. In PowerShell, run:

Test-Path "$env:USERPROFILE\.local\bin\claude.exe"

True means the program is there and only the PATH entry is missing. False means there is no native install. Install it, or, if you used WinGet, go to the WinGet section below. Next, check whether the folder is in PATH:

$env:PATH -split ';' | Select-String '\.local\\bin'

No output means the folder is not in PATH. The docs give this PowerShell command to add it to your user PATH. It needs no administrator rights:

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

In CMD, the docs use the graphical route instead. Open System Settings, go to Environment Variables and add %USERPROFILE%\.local\bin to the User PATH variable. The Microsoft page on environment variables lists the same ways to make a change permanent: your PowerShell profile, the SetEnvironmentVariable() method and the System Control Panel.

Then close the terminal and open a new one. A window that was already open keeps the old PATH. A terminal inside VS Code or another editor takes its PATH from the editor, so quit and reopen the editor too.

Two issue reports add caveats. In issue #86999, the reporter notes that SetEnvironmentVariable() saves the user PATH with variables such as %USERPROFILE% already expanded. If your PATH uses those variables and you want to keep them, use the graphical route. In issue #83569, the installer wrote the entry without the colon after the drive letter (C\Users\...), and Windows read it as a relative path. If .local\bin is in your PATH and claude still fails, check that the entry starts with C:\.

Why did claude stop working right after an update?

If claude worked before and the not recognized error started right after Claude Code updated, look inside %USERPROFILE%\.local\bin. To update on Windows, Claude Code renames the current claude.exe to a backup and moves the new version into its place. If that move fails and Claude Code cannot rename the backup back, the folder keeps the backup and has no claude.exe. The backup name starts with claude.exe.old. and ends with a numeric timestamp.

To restore the newest backup, run this in PowerShell:

Get-ChildItem "$env:USERPROFILE\.local\bin\claude.exe.old.*" | Sort-Object Name | Select-Object -Last 1 | Rename-Item -NewName claude.exe

Then run claude --version. A restored claude.exe prints a version number. If there is no claude.exe.old.* file, or claude still fails, reinstall with irm https://claude.ai/install.ps1 | iex. The docs note that before v2.1.281, Claude Code could delete the backup while claude.exe was still missing.

Issue #105554, opened on October 27, 2026, describes the same state with a leftover claude.exe.new.* file next to the .old one, on a network with timeouts to downloads.claude.ai. The issue was still open on October 29. The reporter recovered by copying one of those files to claude.exe. In that situation the reinstall may fail for the same network reason, so try the rename first.

Why does PowerShell say A parameter cannot be found that matches parameter name 'fsSL'?

You ran the macOS and Linux installer, curl -fsSL https://claude.ai/install.sh | bash, in Windows PowerShell. There, curl is an alias for Invoke-WebRequest, as the Invoke-WebRequest reference for PowerShell 5.1 lists, and that cmdlet rejects the -fsSL flags. Use the PowerShell installer:

irm https://claude.ai/install.ps1 | iex

The same command fixes 'bash' is not recognized as the name of a cmdlet, which also means you ran the macOS and Linux installer on Windows. When you need the real curl in PowerShell, for a network check for example, call curl.exe by its full name, as the docs do.

Why does CMD say 'irm' is not recognized?

irm is a PowerShell command, and you are in Command Prompt. In CMD the prompt shows C:\ without PS. In PowerShell it shows PS C:\. Either open PowerShell from the Start menu and run the PowerShell command, or stay in CMD and use the CMD installer:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

In CMD, curl runs the curl.exe that comes with Windows, so these flags work there.

Why does PowerShell say The token '&&' is not a valid statement separator?

You pasted the CMD installer into Windows PowerShell. PowerShell has the && operator only from PowerShell 7 on, according to the Microsoft page on pipeline chain operators. Windows PowerShell 5.1 rejects it with this error. Use the PowerShell installer instead:

irm https://claude.ai/install.ps1 | iex

Why does the install command print text and install nothing?

You ran only the download half of the command. irm https://claude.ai/install.ps1 on its own prints the script in the terminal. The | iex part is what runs it. In CMD, curl -fsSL https://claude.ai/install.cmd without -o install.cmd prints the batch script instead of saving it. Copy the whole line from the install guide or from the code blocks on this page.

What do System.Xml.XmlDocument and < was unexpected at this time mean?

The install URL returned a web page, an XML document or an error status instead of the install script. In PowerShell you see The term 'System.Xml.XmlDocument' is not recognized, or parse errors from iex that quote HTML tags or CSS. In CMD you see < was unexpected at this time. followed by HTML. A bare curl: (22) The requested URL returned error: 403 can have the same cause.

If the output quotes App unavailable in region, Claude Code is not available in your country. Otherwise the docs suggest three things: retry after a few minutes, check whether a corporate proxy or firewall blocks downloads.claude.ai, or install with winget install Anthropic.ClaudeCode.

How do you update Claude Code installed with WinGet?

A WinGet install does not update itself. Run the upgrade from time to time. The winget upgrade reference documents --id for an exact package ID:

winget upgrade --id Anthropic.ClaudeCode

To have Claude Code run that upgrade for you, set the environment variable CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1. The upgrade can still fail while Claude Code is open, because Windows locks an executable in use. Claude Code then shows the manual command. Close every Claude Code window and run it yourself.

Two WinGet cases have open issues on October 29, 2026:

  • winget upgrade says No applicable upgrade found. while Claude Code still shows Update available. Issue #75654 explains the gap. The banner compares against the newest release, and the WinGet manifest gets that release hours or days later. Wait and run the upgrade again.
  • claude is not recognized after a winget upgrade that reported success. Issue #103963 reproduces it with WinGet 1.29.380 when the same package is installed and upgraded from normal and elevated terminals in turn. The reporter traces the cause to WinGet, in microsoft/winget-cli#6461. The workaround in the issue that needs no admin rights is to add %LOCALAPPDATA%\Microsoft\WinGet\Packages\Anthropic.ClaudeCode_Microsoft.Winget.Source_8wekyb3d8bbwe to your user PATH and open a new terminal. To avoid it, always run winget at the same elevation level.

If you have both a WinGet install and a native install, keep one. where.exe claude lists every claude on your PATH. The docs recommend the native install. To remove the WinGet one, run winget uninstall Anthropic.ClaudeCode.

Why is there no claude in the terminal when you have the VS Code extension?

The VS Code extension carries a private copy of the CLI inside the extension folder, for its own chat panel. It does not put claude in %USERPROFILE%\.local\bin and does not add anything to PATH. If you installed only the extension, run the standalone install from the install guide to use claude in a terminal.

A related case is an older Claude Desktop. It can register a Claude.exe in the WindowsApps folder that comes first in PATH, so claude opens the Desktop app instead of the CLI. Update Claude Desktop to the latest version to fix it.

Why does it say Claude Code does not support 32-bit Windows on a 64-bit PC?

The Start menu has two entries, Windows PowerShell and Windows PowerShell (x86). The x86 entry runs as a 32-bit process and triggers this error even on a 64-bit machine. In the same window, run:

[Environment]::Is64BitOperatingSystem

True means Windows is fine. Close the window, open Windows PowerShell without the x86 suffix and run the installer again. False means a 32-bit edition of Windows, which Claude Code does not support.

What does The process cannot access the file mean during the install?

The PowerShell installer could not write to %USERPROFILE%\.claude\downloads. Usually another install attempt is still running, or an antivirus is scanning a partly downloaded file in that folder. Close the other PowerShell windows that run the installer and wait for the scan to finish. Then delete the folder and run the installer again:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"
irm https://claude.ai/install.ps1 | iex

What does requires either Git for Windows (for bash) or PowerShell mean?

Claude Code found neither shell. Git for Windows is optional, because Claude Code uses its PowerShell tool when Git Bash is missing. So this error means PowerShell is not on your PATH either. Its default folder is C:\Windows\System32\WindowsPowerShell\v1.0\. Add that folder to PATH, install PowerShell 7, or install Git for Windows with "Add to PATH" selected.

If Git is installed and Claude Code still does not find it, run where.exe git and set the bin\bash.exe path of that install in your settings.json:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

The variable accepts only a file named bash.exe, sh.exe, bash or sh. With any other name, such as git-bash.exe, Claude Code ignores it and searches for Git Bash on its own.

Why does PowerShell say running scripts is disabled on this system?

This error comes from an npm install. PowerShell's execution policy blocks the .ps1 launchers that npm creates, such as npm.ps1 and claude.ps1. The PowerShell installer is not affected, because it runs the downloaded text directly. You have three ways out:

  • Allow local scripts for your user with Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. The Microsoft page on execution policies explains what each policy allows.
  • Call npm.cmd or claude.cmd. The policy does not cover .cmd files.
  • Switch to the native installer, which installs a binary instead of a .ps1 script.

Why does WSL say cannot execute binary file: Exec format error?

You are on WSL 1. The program headers of the native binary changed in a way that the WSL 1 loader cannot handle. The docs track it in issue #38788. The clean fix is to convert the distribution to WSL 2 from PowerShell. The first command lists each distribution with its WSL version, per Microsoft's WSL basic commands:

wsl -l -v
wsl --set-version <DistroName> 2

If you need to stay on WSL 1, the docs give a claude() function for ~/.bashrc that calls the binary through the dynamic linker. For the rest of the WSL setup, see the macOS and Linux install guide.

How do you check that Claude Code works after the fix?

Open a new terminal, then run:

claude --version
claude doctor

claude --version prints a version such as 2.1.211 (Claude Code). claude doctor prints read-only diagnostics of the install and the settings without starting a session, with warnings and suggested fixes. If claude is still not found, these two PowerShell commands show which file Windows would run:

where.exe claude
Get-Command claude | Select-Object Source

INFO: Could not find files for the given pattern(s). from where.exe means no claude is on your PATH, so go back to the PATH section. If nothing on this page helps, the docs ask you to search the anthropics/claude-code issues or open a new one with your Windows version, the install command you ran and the full error output.

Frequently asked questions

Do I need administrator rights to fix the PATH?▼

No. The native install and its PATH entry belong to your user. The PowerShell command on this page writes to your user PATH and needs no administrator rights.

Why does claude work in a new window but not in the VS Code terminal?▼

A terminal inside an editor takes its PATH from the editor. Quit the editor completely and open it again after you change the PATH.

Should I install with WinGet or with the native installer?▼

The native installer updates Claude Code in the background, and the docs recommend it. WinGet does not update it by default, so you run winget upgrade Anthropic.ClaudeCode yourself or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1.

Can I keep a native install and a WinGet install at the same time?▼

You can, but two installs cause version mismatches. Run where.exe claude to list them and keep only one.

Does claude doctor fix the problems it finds?▼

No. It only reads the install and the settings and prints warnings with suggested fixes. You apply the fixes yourself.

Do these fixes apply inside WSL?▼

Only the WSL 1 error does. Inside WSL you use the Linux installer, the Linux PATH in ~/.bashrc and the Linux error messages, which the macOS and Linux install guide covers.

Sources

All pages read on October 29, 2026. Issue dates are in Brasília time.

Read next

Explore more: Free GEO audit