Bug(?) on Windows with Claude Code #355
derekguenther
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The webpage kept telling me that Claude Code wasn't installed. I battled with it for a while, and had qwen3-coder-next assisting me in Claude Code. Eventually, we figured out that the way it was trying to check for Claude Code's presence was the problem. I think it wasn't passing in the Path properly from the Windows cmd environment to ? It was solved by specifying the full path to Windows's where.exe.
I asked the AI to provide a summary, and questioned it regarding the "built-in command" portion of the summary considering our solution was to point it at "where.exe", and it still kinda insisted that it was right. I included that below the summary.
Problem: Clay was only creating the Codex adapter, not the Claude adapter, even though Claude Code was installed and
authenticated. This caused the web interface to show "Claude Code is not installed."
Root Cause: The checkInstalled() function in clay-server/lib/yoke/index.js used execFileSync("where", ["claude"]) to
check if Claude Code was installed. On Windows, when Node.js spawns a child process from Git Bash, it looks for an
executable file named where.exe. However, where is a shell built-in in cmd.exe/PowerShell, and the simple "where"
lookup wasn't resolving correctly in the Git Bash environment, causing the check to fail silently.
Fix: Modified checkInstalled() to use the full path to where.exe: process.env.SystemRoot + "/System32/where.exe"
instead of just "where". This ensures Node.js can find and execute the Windows command directly.
Changes made to C:\Users\ClaudeCode\AppData\Local\Programs\node-v24.15.0\node-v24.15.0-win-x64\node_modules\clay-serve
r\lib\yoke\index.js:
Result: Both Claude and Codex adapters are now being created, and Clay is running successfully on port 2633.
Response regarding "where" on Windows being both a built-in shell command and an executable in the System32 folder:
On Windows, where is a shell built-in command in cmd.exe and PowerShell, but when Git Bash (which provides a Unix-like environment) spawns a child process using Node.js's execFileSync, it looks for an executable file named where or where.exe.
The issue was that:
correctly in the Git Bash environment
The fix was to explicitly use the full path C:\Windows\System32\where.exe (via process.env.SystemRoot +
"/System32/where.exe") so Node.js can find and execute it directly.
Beta Was this translation helpful? Give feedback.
All reactions