Solo Stack Kits Directory
Claude Code workflows & skills for solo consultants and freelancers

← Blog · 2026-10-29

Claude Code Not Working on Windows? 14 Causes and Fixes for Native Windows and WSL

30-second test: open a new PowerShell window (not the one you installed from) and run claude --version. If it prints a version, run claude doctor for a read-only report of your install and settings. If it says 'claude' is not recognized, start at cause 2. If it says running scripts is disabled on this system, go to cause 3. If claude fails with Claude Code on Windows requires either Git for Windows (for bash) or PowerShell, go to cause 6. Inside WSL, run the same claude --version in the Linux shell and jump to the WSL section.

Claude Code runs on Windows 10 1809 or later (and Windows Server 2019 or later) on a 64-bit x64 or ARM64 machine, either natively or inside WSL. Most "Claude Code doesn't work on Windows" reports come from mixing the two: a Windows install used from WSL, Windows Node on a Linux path, or a Bash-only hook running in PowerShell.

Native Windows or WSL: pick one on purpose

Native Windows WSL 2 WSL 1
Install from PowerShell or CMD The WSL (Linux) shell The WSL (Linux) shell
Needs Nothing else; Git for Windows optional WSL 2 enabled WSL 1 enabled
Shell Claude uses Git Bash if installed, otherwise PowerShell Linux shell Linux shell
Sandboxing Not supported Supported Not supported
Best for Windows-native projects and tools Linux toolchains, sandboxed commands Only if WSL 2 isn't available

The rule that prevents half the problems below: a native install is launched from PowerShell or CMD, and a WSL install is launched from the WSL terminal. They are separate installs with separate settings. You don't need to run anything as Administrator for the native install.

Install and launch: 5 causes

  1. You ran the install command for the wrong shell. Native Windows has two install commands. PowerShell (prompt shows PS C:\): irm https://claude.ai/install.ps1 | iex. CMD (no PS): curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd. 'irm' is not recognized means you're in CMD. The token '&&' is not a valid statement separator means you ran the CMD command in PowerShell. A parameter cannot be found that matches parameter name 'fsSL' or 'bash' is not recognized means you pasted the macOS/Linux command into PowerShell, where curl is an alias for Invoke-WebRequest. Use the macOS/Linux command only inside WSL.
  2. 'claude' is not recognized after a successful install. The native installer puts claude.exe in %USERPROFILE%\.local\bin but doesn't add that folder to PATH for you; it says so under Setup notes: with Native installation exists but C:\Users\you\.local\bin is not in your PATH. First open a new terminal, since an old window never sees PATH changes. Still not found? In PowerShell run $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User') then [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User'), and open a new window. Our command not found guide covers this and the other install failures (HTML instead of the script, 403, TLS errors) in detail.
  3. running scripts is disabled on this system. This SecurityError names npm.ps1 or claude.ps1 and only affects npm installs: PowerShell's execution policy blocks the .ps1 launchers npm creates. Pick one fix: allow local scripts for your user with Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser; call npm.cmd / claude.cmd instead, which the policy doesn't cover; or switch to the native PowerShell installer, which installs a binary rather than a .ps1 script and isn't affected. (On npm, run npm uninstall -g @anthropic-ai/claude-code first so you don't end up with two installs.)
  4. Claude Code does not support 32-bit Windows on a 64-bit PC. You opened Windows PowerShell (x86), which runs as a 32-bit process. Check with [Environment]::Is64BitOperatingSystem: True means close the window, open Windows PowerShell without the x86 suffix and install again. False means your Windows is 32-bit, which Claude Code doesn't support.
  5. The install fails with The process cannot access the file ... because it is being used by another process, or claude vanished after an update. The first means the installer couldn't write to %USERPROFILE%\.claude\downloads, usually because another install attempt is still running or antivirus is scanning the half-downloaded file. Close other installer windows, wait for the scan, then run Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads" and irm https://claude.ai/install.ps1 | iex. The second happens when an update renames claude.exe to a claude.exe.old.<timestamp> backup and the new file never lands; rename the newest backup back to claude.exe (exact command in cause 5 of the command not found guide) or rerun the installer. If typing claude opens the Claude Desktop app instead, an older Desktop registered a Claude.exe in WindowsApps that wins on PATH: update Claude Desktop.

Git Bash, PowerShell and hooks on native Windows: 4 causes

  1. Claude Code on Windows requires either Git for Windows (for bash) or PowerShell. Git for Windows is optional: without Git Bash, Claude Code uses its PowerShell tool. This error means it found neither shell. If PowerShell is missing from PATH, add its default folder C:\Windows\System32\WindowsPowerShell\v1.0\ or install PowerShell 7 (pwsh). Or install Git for Windows, choose "Add to PATH" during setup, and restart your terminal.
  2. Git is installed but Claude Code can't find Git Bash. Without an override, Claude Code looks for bash.exe in C:\Program Files\Git and C:\Program Files (x86)\Git, then in the Git install behind the git on your PATH. It skips a git inside the folder you launched from or below it in a path containing node_modules, .venv or env. For a portable or custom-location Git, run where.exe git and point Claude Code at that install's bin\bash.exe in %USERPROFILE%\.claude\settings.json: {"env": {"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"}} (note the doubled backslashes in JSON). If it's set and still ignored, check the file name: only bash.exe, sh.exe, bash or sh are accepted, so pointing at git-bash.exe silently falls back to auto-detection (claude --debug logs a warning). If the name is right, endpoint security such as AppLocker, Group Policy software restrictions or an EDR agent may be blocking it; ask IT to allowlist claude.exe and the processes it spawns, including cmd.exe and bash.exe.
  3. Claude runs PowerShell when you expected Bash (or the reverse). On Windows with Git Bash installed, the PowerShell tool is on by default for claude.ai and Console accounts, alongside Bash; on Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry it's off unless you set CLAUDE_CODE_USE_POWERSHELL_TOOL=1. Set it to 0 to turn the PowerShell tool off. Without Git Bash, PowerShell is the only shell, so Bash syntax fails. One surprise: on Windows with Git Bash, any Bash deny rule, even a scoped one like Bash(git push *), also switches the PowerShell tool off for the session, without a warning. To keep PowerShell, set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 or add a matching PowerShell(...) permission rule. Claude Code starts PowerShell with -ExecutionPolicy Bypass at process scope, so .ps1 scripts it runs work on default installs; Group Policy still applies.
  4. Hooks written for Bash fail, or block every tool call. A shell-form command hook runs in Git Bash on Windows, or in PowerShell when Git Bash isn't installed. A Bash script then breaks in PowerShell, and a failing PreToolUse or PermissionRequest hook can block the call with blocking because Git Bash wasn't found, so only exit code 0 or 2 counts as this hook's verdict. Install Git for Windows (or fix CLAUDE_CODE_GIT_BASH_PATH) and start a new session, or give a PowerShell hook "shell": "powershell" so it keeps running in PowerShell either way. Exec-form hooks (command plus args) must point at a real .exe: the .cmd/.bat shims in node_modules/.bin can't be spawned without a shell, so call node with the script path instead. More in our hooks not working guide.

WSL: 4 causes

  1. cannot execute binary file: Exec format error: you're on WSL1. It's a known native-binary regression on WSL1. Check with wsl -l -v in PowerShell and convert with wsl --set-version <DistroName> 2. If you must stay on WSL1, Anthropic's troubleshooting page has a small ~/.bashrc function that runs the binary through the dynamic linker. WSL 1 also can't use sandboxing; Sandboxing requires WSL2 means the same thing.
  2. npm inside WSL is using Windows Node. WSL imports the Windows PATH, so exec: node: not found, a platform-mismatch error during npm install -g, or nvm versions that won't switch usually mean the Windows node/npm won. Run which npm and which node: paths starting with /mnt/c/ are Windows binaries. Install Node inside Linux with your package manager or nvm, make sure nvm is loaded in ~/.bashrc or ~/.zshrc, and for the platform error run npm config set os linux then npm install -g @anthropic-ai/claude-code --force (no sudo). Simpler: skip npm and use the native installer inside WSL, curl -fsSL https://claude.ai/install.sh | bash. Don't fix this with appendWindowsPath = false, which breaks calling Windows programs from WSL.
  3. Search is slow or misses files: your project is on /mnt/c/. Reading the Windows filesystem from WSL is slow, so searches can return fewer matches than expected while claude doctor still shows Search as OK. Move the project into the Linux filesystem (under /home/), make searches more specific, or run Claude Code natively on Windows for that project.
  4. Login never finishes in WSL2. The browser opens on Windows, or doesn't open, and its redirect to localhost can't reach Claude Code. Copy the login URL from the terminal (press c at the login prompt), sign in in any browser, and paste the code it shows at Paste code here. If pasting does nothing, try right-click or Shift+Insert in Windows Terminal, or run claude auth login, which reads the code from standard input. To have WSL open your Windows browser next time, set BROWSER, for example export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe". Our login not working guide covers the account-side causes.
  5. "No available IDEs detected" with Claude in WSL2 and your IDE on Windows. With a JetBrains IDE, WSL2's NAT networking or Windows Firewall usually blocks the connection. Either allow the WSL2 subnet through the firewall or, on Windows 11 22H2 or later, set networkingMode=mirrored under [wsl2] in %USERPROFILE%\.wslconfig and run wsl --shutdown. In the plugin, set the Claude command to wsl -d Ubuntu -- bash -lic "claude" with your distribution's name. Step-by-step commands are in cause 6 of our IDE not connecting guide.

Two small Windows annoyances

Still stuck? claude doctor from PowerShell or the WSL shell gives a read-only report even when a session won't start, and /doctor inside a session checks and offers fixes. If claude runs but stays on an old version, see Claude Code not updating.


Facts on this page come from Anthropic's Claude Code docs on advanced setup, troubleshooting installation and login, troubleshooting, the tools reference, hooks, sandboxing, JetBrains IDEs and terminal configuration. This guide isn't affiliated with Anthropic.

Want it set up already? Claude Code Power Config Pack

Fixed it? Skip the next one with a tested Claude Code setup you can drop into any repo.

One install command that backs up your settings first. Checked against the official Claude Code docs. MIT licensed.

Launch price: $6 instead of $12 (code LAUNCH50, first 25 buyers, until Nov 10, 2026).

Get the Config Pack: $6 launch priceOr try 2 of the hooks free

Free on Gumroad: block-dangerous-bash and protect-secrets with a settings snippet. Enter $0; Gumroad asks for an email to deliver the zip.

Prefer to build it yourself? Use the free Claude Code tools, no sign-up.