-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Windows: spawning claude via child_process fails (ENOENT/EINVAL) due to missing .cmd handling #91489
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Environment
Summary
On Windows 10, spawning the
claudecommand via Node.jschild_processfails withENOENTandEINVALerrors. The.cmdextension is not appended to the resolved command, andshell: trueis not set for.cmd/.batfiles.On Windows, executables installed as npm-style shims (like
claude) are.cmdfiles. Node'schild_process.spawnwill not locateclaudewithout the.cmdextension (→ENOENT), and starting Windows batch files (.cmd/.bat) withoutshell: truethrowsEINVALon recent Node.js versions.Root cause
File:
supervisor-Cw-nY4TI.jsresolveCommand: thecmdCommandslist does not include"claude", so the command is not resolved toclaude.cmd.createChildAdapter:shell: trueis not set for commands ending in.cmdor.bat, which is required to launch batch files on Windows.Suggested fix
"claude"tocmdCommandsinresolveCommand.createChildAdapter, setshell: truewhen the resolved command ends with.cmdor.bat.