-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: spawn gemini ENOENT on Windows (missing .cmd extension handling) #98573
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When running OpenClaw on Windows configured with the google-gemini-cli provider, the application crashes when attempting to execute the Gemini CLI.
The error is spawn gemini ENOENT. This indicates that the application is trying to spawn a process named exactly gemini.
On Windows, global npm packages create a gemini.cmd file in the PATH, not a gemini executable. Node.js's child_process.spawn() does not automatically append .cmd extension extensions on Windows by default, causing the lookup to fail.
Steps to reproduce
Expected behavior
OpenClaw should successfully execute the global gemini command and receive the output.
Actual behavior
OpenClaw fails immediately when trying to run the command.
OpenClaw version
2026.6.11
Operating system
Windows 11
Install method
npm global
Model
gemini 3.1 pro preview
Provider / routing chain
User Input -> Agent Policy Check (agents/tool-policy) -> Routing Decision: Use CLI Backend -> Provider Selection: Use google-gemini-cli provider -> OS Execution: process/supervisor attempts spawn('gemini') -> [FAILURE HERE]
Additional provider/model setup details
No response
Logs
15:41:55+05:30 info agent/cli-backend {"subsystem":"agent/cli-backend"} cli exec: provider=google-gemini-cli model=gemini-3.1-pro-preview ... 15:41:55+05:30 warn process/supervisor {"subsystem":"process/supervisor"} spawn failed: runId=ae9f581a-0774-4230-bcdb-4b1fc0d1e837 reason=Error: spawn gemini ENOENT 15:39:50+05:30 error Embedded agent failed before reply: spawn gemini ENOENTScreenshots, recordings, and evidence
Impact and severity
No response
Additional information
No response