Claude Code Won't Start on Windows? Match the Error, Not the Guide
Raw mode is not supported, 'claude' is not recognized, 32-bit Windows, Exec format error on WSL1 — five different Windows startup failures that get treated as one problem. Each has a distinct cause and a distinct fix, and four of them aren't install failures at all.
Five different Windows failures get lumped together as "it won't install." They are not the same problem, and generic install guides send you in circles because they cover only one of them. The error text tells you which one you have — start there rather than reinstalling.
| What you see | Actual cause |
|---|---|
Raw mode is not supported | Git Bash, or piped stdin — not the install |
'claude' is not recognized | PATH, or a terminal opened before the install |
Claude Code does not support 32-bit Windows | You opened the PowerShell (x86) shortcut |
cannot execute binary file: Exec format error | WSL1 |
syntax error near unexpected token followed by HTML | A proxy returned a login page |
Four of the five are environment problems wearing an installation costume. Reinstalling fixes none of them.
Raw mode is not supported — two different triggers
This is the one that dominates the search results, and it isn't an install problem. The install worked.
Trigger 1: you launched it from Git Bash
An interactive terminal UI needs raw mode — the ability to read keypresses one at a time instead of waiting for a newline. That requires a real TTY, and Git Bash on Windows doesn't provide the TTY features the interactive CLI needs. You hit the error before you even finish authenticating.
The fix isn't to abandon Git Bash. It's to launch from PowerShell and let the CLI call Git Bash internally for the commands it runs. You keep the Unix tooling; you just stop hosting the interactive UI in a terminal that can't support it.
That split matters on Windows, because the installer wants both — it will tell you so with Claude Code on Windows requires either Git for Windows (for bash) or PowerShell. In practice you want PowerShell to run in, and Git for Windows to shell out to.
Trigger 2: you piped something into it
If you get the same error in PowerShell, look at your command rather than your terminal:
# Cannot work — a pipe is not a TTY
echo "explain this repo" | claudeRaw mode requires stdin to be a TTY, and a pipe isn't one. That's exactly what issue #5925 reports. For non-interactive use, pass the prompt as an argument:
claude -p "explain this repo"-p runs in print mode: it answers and exits without ever trying to enter raw mode. Anything scripted, piped, or running in CI wants that flag — there's no terminal in a CI job for raw mode to attach to either.
'claude' is not recognized
The install reported success and the command doesn't exist. The wording differs by shell, which is worth knowing when you're searching for it:
| Shell | Error |
|---|---|
| Windows CMD | 'claude' is not recognized as an internal or external command |
| PowerShell | claude : The term 'claude' is not recognized as the name of a cmdlet |
Both mean the install directory isn't on your PATH. On Windows the binary lands here:
%USERPROFILE%\.local\bin\claude.exeBefore editing any environment variables: close the terminal and open a new one. PATH changes apply to new shells only, so the window that ran the installer still has the old PATH and will keep failing no matter how many times you reinstall. The same root cause shows up as the installer completing but claude reporting an old version.
does not support 32-bit Windows on a 64-bit machine
Genuinely confusing, and the cause is a Start menu entry.
Windows ships two PowerShell 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. Confirm it in the same window that produced the error:
[Environment]::Is64BitOperatingSystemIf that prints True, your OS is fine and you opened the wrong shortcut. Close it, open Windows PowerShell without the x86 suffix, and install again.
Exec format error in WSL
If claude in WSL prints cannot execute binary file: Exec format error, you're on WSL1, hitting a known native-binary regression tracked in issue #38788 — the binary's program headers changed in a way WSL1's loader can't handle.
The clean fix is converting the distribution, from PowerShell:
wsl --set-version <DistroName> 2Staying on WSL1 is possible by invoking the binary through the dynamic linker, but converting is the supported path and removes a class of problems rather than one.
HTML where a script should be
Your install command downloaded a web page instead of a script:
bash: line 1: syntax error near unexpected token
bash: line 1: <!DOCTYPE html>On PowerShell the same thing surfaces as parse errors quoting HTML tags or CSS, sometimes as Missing expression after unary operator or a ParserError. HTML in the error text is the tell.
This is a network problem, not a tooling one — usually a corporate proxy or captive portal returning a login page. Saving with -OutFile doesn't help, because the saved file is that same page.
Then decide: native Windows or WSL?
Once it starts, there's a second choice with a consequence most comparisons miss.
On WSL, searching across the Windows filesystem silently returns fewer matches than it should — and claude doctor still reports Search as OK. No error, no warning, just an agent that appears not to understand your codebase. If you use WSL, keep the project on the Linux filesystem under /home/ rather than /mnt/c/.
I develop on Windows natively for that reason. I covered that failure and the other silent ones in why Claude Code goes slow, hangs, or eats memory. Controlling what these tools can see about a project on Windows is the same problem ContextZero came out of.
When none of the rows match
Run the built-in check before reinstalling anything:
claude doctorIt checks your installation, settings, extensions and context usage, and proposes fixes it can apply after you confirm. Use claude doctor from your shell when it won't start, and /doctor inside a session when it starts but misbehaves.
Key takeaways
- Raw mode is not supported is not an install failure. Git Bash cannot provide a TTY — launch from PowerShell and let the CLI call Git Bash internally.
- The same error in PowerShell means you piped input. Use claude -p with your prompt instead of echoing into it.
- 'claude' is not recognized is usually a terminal that was already open. PATH changes apply to new shells only.
- does not support 32-bit Windows on a 64-bit machine means you opened the PowerShell (x86) Start menu entry.
- Exec format error means WSL1. Convert the distro to WSL2 rather than working around the loader.
Frequently asked questions
Why does Claude Code say Raw mode is not supported in Git Bash?
Git Bash does not provide the TTY features an interactive terminal UI needs. The CLI requires raw mode to read keypresses one at a time, and Git Bash cannot supply it, so the CLI exits before you finish authenticating. Launch Claude Code from PowerShell instead and let it use Git Bash internally for the commands it runs.
I get Raw mode is not supported even in PowerShell. Why?
You are almost certainly piping input into claude. Raw mode requires stdin to be a TTY, and a pipe is not one. For non-interactive use, pass the prompt with the -p flag rather than piping it in — print mode answers and exits without ever entering raw mode.
Why is claude not recognized after the install said it succeeded?
The install directory is not on your PATH, or you are still in a terminal that was open when the installer ran. On Windows the binary lands in your user profile under .local\bin. PATH changes apply to new shells only, so close the terminal and open a new one before concluding the install failed.
Should I use WSL or native Windows for Claude Code?
Native Windows avoids a real and silent problem: on WSL, searching across the Windows filesystem returns fewer matches than expected while claude doctor still reports Search as OK. If you do use WSL, keep the project on the Linux filesystem under /home/ rather than /mnt/c/, and use WSL2 rather than WSL1.
Read the error, match it to the row, and you're usually two minutes from working. The reason these take people an afternoon is that the loudest search results all assume the same cause, and four times out of five that assumption is wrong.
If your servers start but their tools never appear, that's a different class of problem — MCP server not showing up in Claude Code covers it, including the Windows cmd /c fix that trips up npm-distributed servers.
References
- Troubleshoot installation and login — Claude Code docscode.claude.com · accessed 2026-08-21
- Troubleshooting — Claude Code docscode.claude.com · accessed 2026-08-21
- CLI crashes with Raw mode is not supported when piping input (issue #5925)github.com · accessed 2026-08-21
- Exec format error on WSL1 (issue #38788)github.com · accessed 2026-08-21
Last reviewed August 21, 2026
Tahir Nazir
Senior AI Engineer & Full-Stack Lead
5+ years shipping AI-powered products — RAG pipelines, agentic workflows, and MCP tooling. Top Rated on Upwork with a 100% job success score.
More about Tahir →Keep reading
New posts land here first. Follow along by RSS, or get in touch if you are building something similar.
Related articles
Claude Code Slow, Hanging, or Eating Memory? Start With the Silent Failures
High CPU, frozen commands and missing search results usually trace to a handful of specific causes — a thrashing auto-compact loop, a bundled ripgrep that won't run, or WSL quietly returning fewer matches while claude doctor reports everything as OK.TroubleshootingAI Engineering8 min readMCP Server Not Showing Up in Claude Code? Read the Status First
Your MCP server is configured but Claude can't see it. `claude mcp list` tells you which of five different problems you actually have — pending approval, a failed spawn, a Windows .cmd shim, zero advertised tools, or a server that was never in the list to begin with.TroubleshootingAI Engineering11 min readWhy Claude Code Burns Tokens While You're Not Even Using It
Your usage climbs during a long session even when you barely type. The reasons are specific and mostly invisible: every request carries the whole conversation, your prompt cache quietly expires, and scheduled tasks, cross-session messages and idle teammates each resend your full context.TroubleshootingAI Engineering10 min read