Can't use Claude Code on Windows
Describe the bug
- Select Claude Code as model provider
- Exec chat "Develop a tamagotchi game that lives on my computer and follows a pixelated styling"
- Error:
Request failed: Failed to spawn Claude CLI command 'C:\Users\Sammy\AppData\Roaming\npm\claude': %1 is not a valid Win32 application. (os error 193). Make sure the Claude Code CLI is installed and in your PATH, or set CLAUDE_CODE_COMMAND in your config to the correct path.
Expected behavior Command should not fail
Screenshots If applicable, add screenshots to help explain your problem.
claude is a recognized command on my system:
Please provide following information:
- OS & Arch: Windows 11 Pro 24H2
- Interface: [UI/CLI]
- Version: 1.4.0
- Extensions enabled: Computer Controller, Developer, Playwright, Vscode, Memory
- Provider & Model: Claude Code
Additional context Add any other context about the problem here.
Same here.
some reason mine says
Request failed: Failed to spawn Claude CLI command 'C:\Users\acoop\scoop\apps\nvm\current\nodejs\nodejs\claude': %1 is not a valid Win32 application. (os error 193). Make sure the Claude Code CLI is installed and in your PATH, or set CLAUDE_CODE_COMMAND in your config to the correct path.
Same problem here: Request failed: Failed to spawn Claude CLI command
even if set the path in config.
same here, even though if I do spawn a powershell window and type 'claude', it works out of the box..
FYI we won't be able to support claude cli provider on windows for the time being. cc @blackgirlbytes do you happen to recall if you document this limitation?
If I had to guess, the problem will be that Goose is trying to spawn npm's command claude, which is not executable on Windows, instead of claude.cmd, which can be started on Windows. Windows shell is smart enough to add .cmd, but whatever goose is using to run these, probably isn't.
I think I saw it before, and it might happen for npx/npx.cmd and extensions too.
I'm getting the same error on Mac too...I have claude installed as a global npm install and I've added the bin for npm on the PATH, same for gemini
the error says to try to set CLAUDE_CODE_COMMAND, can you try that? not saying that is the correct solution, but if it does work it tells us what's going on
I've kinda fixed it by using the direct path of Claude code as a command but that's obviously not ideal
agree with @michaelneale that we should mark claude code on windows as not officially supported. :(
no i dont think we document this limitation. i think you were kind enough to add the documentation for us, @michaelneale . I will add this limitation now. Thank you!