Skip to content

[Bug]: Windows 11 - Claude CLI provider fails with spawn claude ENOENT #92054

Description

@arturomagdiel

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw fails to execute Claude Code on Windows 11 with "spawn claude ENOENT" even though Claude Code is installed and working.

Steps to reproduce

  1. Install Claude Code 2.1.167 on Windows 11.
  2. Authenticate Claude CLI in OpenClaw.
  3. Set anthropic/claude-opus-4-8 as the default model.
  4. Run:

openclaw agent --local --agent main --message "hello"

  1. Observe the error:

spawn claude ENOENT

Expected behavior

OpenClaw should successfully execute Claude Code and return a model response.

Actual behavior

Every request fails before model execution with:

spawn claude ENOENT

Claude Code itself is installed and functional.

OpenClaw version

2026.6.5

Operating system

Windows 11

Install method

No response

Model

npm global

Provider / routing chain

openclaw -> claude-cli -> anthropic

Additional provider/model setup details

Claude Code 2.1.167 is installed.

The following command works:

claude --version

Result:

2.1.167 (Claude Code)

The Claude executable also works directly:

C:\Users\artur\AppData\Roaming\npm\node_modules@anthropic-ai\claude-code\bin\claude.exe --version

Result:

2.1.167 (Claude Code)

Logs, screenshots, and evidence

openclaw agent --local --agent main --message "hello"

Output:

[agent/cli-backend] cli exec: provider=claude-cli model=claude-opus-4-8

[process/supervisor] spawn failed

Error: spawn claude ENOENT

node -e "require('child_process').spawn('claude',['--version'],{shell:true,stdio:'inherit'})"

2.1.167 (Claude Code)

Impact and severity

Affected: Windows users using Claude CLI provider

Severity: High

Frequency: 100% reproducible

Consequence: OpenClaw cannot use Claude Code and all requests fail before model execution.

Additional information

Node.js version: 24.15.0

Claude Code version: 2.1.167

PATH includes:

C:\Users\artur\AppData\Roaming\npm

The issue appears related to process spawning on Windows because spawn('claude') fails while spawn('claude',{shell:true}) succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:linked-pr-openClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions