On Windows, an npm-installed Claude Code CLI provides claude.ps1 / claude.cmd shims on PATH rather than an .exe. Kaimon's agent service spawns `claude -p ...` directly, and libuv/Base.run only resolves real executables — so opening the agent fails with:
Error opening agent: IOError: could not spawn setenv(`claude -p --input-format stream-json ...`): no such file or directory (ENOENT)
...even though claude --version works fine in the user's shell.
Installing the native build (irm https://claude.ai/install.ps1 | iex, which drops claude.exe into ~/.local/bin) fixes it.
Suggestions (any subset):
- Detect the situation: if spawning fails and
Sys.which("claude") === nothing while a claude.cmd/claude.ps1 exists on PATH, raise a clear error telling the user to install the native CLI.
- Or spawn via
cmd /c claude ... on Windows when only a shim is present.
- Docs: note that on Windows the native installer is required for the agent.
Also worth noting: the ENOENT error message currently dumps the entire environment block (including any API keys in the user's environment) into the UI — trimming that would avoid accidental secret leaks when users paste errors into issues.
On Windows, an npm-installed Claude Code CLI provides
claude.ps1/claude.cmdshims on PATH rather than an.exe. Kaimon's agent service spawns`claude -p ...`directly, and libuv/Base.runonly resolves real executables — so opening the agent fails with:...even though
claude --versionworks fine in the user's shell.Installing the native build (
irm https://claude.ai/install.ps1 | iex, which dropsclaude.exeinto~/.local/bin) fixes it.Suggestions (any subset):
Sys.which("claude") === nothingwhile aclaude.cmd/claude.ps1exists on PATH, raise a clear error telling the user to install the native CLI.cmd /c claude ...on Windows when only a shim is present.Also worth noting: the ENOENT error message currently dumps the entire environment block (including any API keys in the user's environment) into the UI — trimming that would avoid accidental secret leaks when users paste errors into issues.