← 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, runclaude doctorfor a read-only report of your install and settings. If it says'claude' is not recognized, start at cause 2. If it saysrunning scripts is disabled on this system, go to cause 3. Ifclaudefails withClaude Code on Windows requires either Git for Windows (for bash) or PowerShell, go to cause 6. Inside WSL, run the sameclaude --versionin 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
- 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 (noPS):curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd.'irm' is not recognizedmeans you're in CMD.The token '&&' is not a valid statement separatormeans you ran the CMD command in PowerShell.A parameter cannot be found that matches parameter name 'fsSL'or'bash' is not recognizedmeans you pasted the macOS/Linux command into PowerShell, wherecurlis an alias forInvoke-WebRequest. Use the macOS/Linux command only inside WSL. 'claude' is not recognizedafter a successful install. The native installer putsclaude.exein%USERPROFILE%\.local\binbut doesn't add that folder to PATH for you; it says so underSetup notes:withNative 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.running scripts is disabled on this system. ThisSecurityErrornamesnpm.ps1orclaude.ps1and only affects npm installs: PowerShell's execution policy blocks the.ps1launchers npm creates. Pick one fix: allow local scripts for your user withSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser; callnpm.cmd/claude.cmdinstead, which the policy doesn't cover; or switch to the native PowerShell installer, which installs a binary rather than a.ps1script and isn't affected. (On npm, runnpm uninstall -g @anthropic-ai/claude-codefirst so you don't end up with two installs.)Claude Code does not support 32-bit Windowson a 64-bit PC. You opened Windows PowerShell (x86), which runs as a 32-bit process. Check with[Environment]::Is64BitOperatingSystem:Truemeans close the window, open Windows PowerShell without the x86 suffix and install again.Falsemeans your Windows is 32-bit, which Claude Code doesn't support.- The install fails with
The process cannot access the file ... because it is being used by another process, orclaudevanished 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 runRemove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"andirm https://claude.ai/install.ps1 | iex. The second happens when an update renamesclaude.exeto aclaude.exe.old.<timestamp>backup and the new file never lands; rename the newest backup back toclaude.exe(exact command in cause 5 of the command not found guide) or rerun the installer. If typingclaudeopens the Claude Desktop app instead, an older Desktop registered aClaude.exeinWindowsAppsthat wins on PATH: update Claude Desktop.
Git Bash, PowerShell and hooks on native Windows: 4 causes
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 folderC:\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.- Git is installed but Claude Code can't find Git Bash. Without an override, Claude Code looks for
bash.exeinC:\Program Files\GitandC:\Program Files (x86)\Git, then in the Git install behind thegiton your PATH. It skips agitinside the folder you launched from or below it in a path containingnode_modules,.venvorenv. For a portable or custom-location Git, runwhere.exe gitand point Claude Code at that install'sbin\bash.exein%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: onlybash.exe,sh.exe,bashorshare accepted, so pointing atgit-bash.exesilently falls back to auto-detection (claude --debuglogs 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 allowlistclaude.exeand the processes it spawns, includingcmd.exeandbash.exe. - 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 to0to turn the PowerShell tool off. Without Git Bash, PowerShell is the only shell, so Bash syntax fails. One surprise: on Windows with Git Bash, anyBashdeny rule, even a scoped one likeBash(git push *), also switches the PowerShell tool off for the session, without a warning. To keep PowerShell, setCLAUDE_CODE_USE_POWERSHELL_TOOL=1or add a matchingPowerShell(...)permission rule. Claude Code starts PowerShell with-ExecutionPolicy Bypassat process scope, so.ps1scripts it runs work on default installs; Group Policy still applies. - 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
PreToolUseorPermissionRequesthook can block the call withblocking because Git Bash wasn't found, so only exit code 0 or 2 counts as this hook's verdict.Install Git for Windows (or fixCLAUDE_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 (commandplusargs) must point at a real.exe: the.cmd/.batshims innode_modules/.bincan't be spawned without a shell, so callnodewith the script path instead. More in our hooks not working guide.
WSL: 4 causes
cannot execute binary file: Exec format error: you're on WSL1. It's a known native-binary regression on WSL1. Check withwsl -l -vin PowerShell and convert withwsl --set-version <DistroName> 2. If you must stay on WSL1, Anthropic's troubleshooting page has a small~/.bashrcfunction that runs the binary through the dynamic linker. WSL 1 also can't use sandboxing;Sandboxing requires WSL2means the same thing.- npm inside WSL is using Windows Node. WSL imports the Windows PATH, so
exec: node: not found, a platform-mismatch error duringnpm install -g, or nvm versions that won't switch usually mean the Windowsnode/npmwon. Runwhich npmandwhich 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~/.bashrcor~/.zshrc, and for the platform error runnpm config set os linuxthennpm install -g @anthropic-ai/claude-code --force(nosudo). Simpler: skip npm and use the native installer inside WSL,curl -fsSL https://claude.ai/install.sh | bash. Don't fix this withappendWindowsPath = false, which breaks calling Windows programs from WSL. - 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 whileclaude doctorstill 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. - Login never finishes in WSL2. The browser opens on Windows, or doesn't open, and its redirect to
localhostcan't reach Claude Code. Copy the login URL from the terminal (presscat the login prompt), sign in in any browser, and paste the code it shows atPaste code here. If pasting does nothing, try right-click or Shift+Insert in Windows Terminal, or runclaude auth login, which reads the code from standard input. To have WSL open your Windows browser next time, setBROWSER, for exampleexport BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe". Our login not working guide covers the account-side causes. - "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=mirroredunder[wsl2]in%USERPROFILE%\.wslconfigand runwsl --shutdown. In the plugin, set the Claude command towsl -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
- Backspace deletes a whole word. On Windows, Claude Code treats a Backspace that arrives as
^Has Ctrl+Backspace. If your terminal sends^Hfor plain Backspace, setCLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0. - Garbled characters in the VS Code or Cursor terminal. Run
/terminal-setupinside Claude Code, which turns off the integrated terminal's GPU acceleration (terminal.integrated.gpuAcceleration), then reload the window. It also sets up Shift+Enter for new lines there; in Windows Terminal, Shift+Enter works without setup, and Ctrl+J works everywhere.
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.