DEV Community

Sungwoo Lee
Sungwoo Lee

Posted on Originally published at my-blog.org

Claude Code Not Recognized on Windows: 4 Causes to Check First

If claude says "not recognized" right after you installed Claude Code on Windows, reinstalling usually isn't the fix. There are four common causes: you ran the install command for the wrong shell, the install folder isn't on PATH, a different copy (for example from npm) is the one answering, or you only installed the VS Code extension. Reinstalling fixes only the first one. The other three give you the same error again, so two quick checks are worth more than a second install.

This is a condensed, reproducible version of a longer Korean write-up. The full article with the complete error table and FAQ is on my main blog. The behavior described below follows Anthropic's setup and troubleshooting docs as I read them, plus one test on a Windows PowerShell 5.1, 64-bit machine.

Did you run the install command for the wrong shell?

The official Windows installer doesn't need admin rights, but the command differs per shell:

# PowerShell
irm https://claude.ai/install.ps1 | iex
Enter fullscreen mode Exit fullscreen mode
:: CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Enter fullscreen mode Exit fullscreen mode

There is also winget install Anthropic.ClaudeCode. According to the docs, winget installs don't auto-update, so for a first install I'd pick one of the two commands above.

The wrong-shell mistakes leave recognizable messages:

What you see What happened
'irm' is not recognized A PowerShell command was run in CMD
The token '&&' is not a valid statement separator A CMD command was run in PowerShell
A parameter cannot be found that matches parameter name 'fsSL' The Mac/Linux curl pipe-to-bash line was run in PowerShell
The script text prints line by line The iex part was dropped from the irm line

The third one is common if you follow a Mac-oriented course: in Windows PowerShell, curl is an alias that doesn't accept -fsSL.

Why does the installer leave PATH untouched?

The installer puts the binary at %USERPROFILE%\.local\bin\claude.exe but does not edit PATH. So "installation complete" can be followed by "not recognized" in a new terminal. Check the file first, then PATH:

Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
$env:PATH -split ';' | Select-String '\.local\\bin'
Enter fullscreen mode Exit fullscreen mode

If the first line says True and the second prints nothing, add the folder to your user PATH:

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

Open a new terminal and run claude --version. If it still fails inside an editor, restart the editor: its integrated terminal inherits PATH from when the editor started.

In CMD, the equivalents are dir "%USERPROFILE%\.local\bin\claude.exe" and echo %PATH% | findstr /i "local\bin".

Is another install the one that runs?

Four causes of claude not recognized on Windows with the symptom and check for each

Here is the case that surprised me. On my test machine, Test-Path returned False, yet claude ran fine. .local\bin was on PATH, and Get-Command claude -All listed three files under AppData\Roaming\npm\: claude.ps1, claude.cmd, and claude. claude --version printed 2.1.331 (Claude Code). An older npm install was answering the command.

If I had read False as "not installed" and re-run the installer, I'd have ended up with two copies, with PATH order deciding which one wins. List every copy before touching anything:

where.exe claude
Get-Command claude -All | Select-Object -ExpandProperty Source
Enter fullscreen mode Exit fullscreen mode

One related trap from the docs: an old Claude desktop app can register a Claude.exe under WindowsApps that takes priority on PATH. If typing claude opens the desktop app, update the desktop app.

Is only the VS Code extension installed?

Of 259 collected course questions, 16 were about problems running Claude Code after installation

The VS Code extension carries its own copy of the CLI and does not add claude to your shell PATH. So chat works in the extension panel while the terminal underneath says "not recognized". The fix is to run the standalone install once (the commands from the first section), then reopen VS Code.

This pattern turned up in questions I tallied from a public course Q&A board: of 259 questions collected on 2026-11-25, 16 were about problems running Claude Code after installation. The titles differed ("installation complete but I can't run it", "pasting into PowerShell does nothing", "can't connect from the VS Code terminal"), but the causes were the same four.

What if the install command itself fails?

If the command is right and the installer still doesn't finish, these are the messages and fixes the docs list, as I summarized them:

Message Cause Fix
TLS or SSL connection error Windows PowerShell 5.1 doesn't use TLS 1.2 by default [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, then re-run
running scripts is disabled on this system Execution policy blocks the npm .ps1 shim Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
The process cannot access the file A prior attempt or antivirus holds the file Close other installers, delete %USERPROFILE%\.claude\downloads, re-run
32-bit related error 32-bit Windows, or an x86 PowerShell window Check [Environment]::Is64BitOperatingSystem, use 64-bit PowerShell

On a company PC, a TLS error can come from a proxy inspecting certificates. That needs your IT team to register the CA certificate; there's no client-side workaround, and locked-down PATH or script policies need an administrator too.

Reinstall last

The three misdiagnoses I see most:

  • "The installer said complete, so PATH is fine." The completion message says nothing about PATH.
  • "Test-Path is False, so it isn't installed." Another install may be running. Run where.exe claude first.
  • "Chat works in VS Code, so the CLI is installed." The extension's copy isn't visible to the terminal.

A short checklist: confirm which shell you're in, run the matching install command as one full line, Test-Path the binary, filter PATH for .local\bin, run where.exe claude for stray copies, then open a new terminal and run claude --version.

Limits: my measurements come from a single Windows PowerShell 5.1, 64-bit machine, and macOS and Linux aren't covered. For the full FAQ (admin rights, Git for Windows, winget updates), see the complete troubleshooting write-up.


Free tools I keep on my own site: 34 calculators and how-to guides - loans, severance pay, take-home salary, savings vs deposits. New ones go out in one email, no ads.

Top comments (0)