Skip to content

[Bug]: Windows: spawn claude ENOENT "claude" missing from cmdCommands shim allowlist #68788

@HaseebDev

Description

@HaseebDev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On Windows, OpenClaw fails to spawn the Claude CLI with Error: spawn claude ENOENT. Every model in the fallback chain fails. Root cause: "claude" is missing from the cmdCommands allowlist used by resolveWindowsCommandShim, so .cmd is never appended and Node's spawn() can't resolve claude.cmd on Windows.

Steps to reproduce

  1. Official install script: curl -fsSL https://openclaw.ai/install.sh | bash
  2. Install the Claude CLI (Anthropic's claude.cmd shim on PATH).
  3. Start OpenClaw and send any message that routes to provider=claude-cli.

Expected behavior

OpenClaw resolves claude to claude.cmd on Windows (same way it already does for npm, pnpm, yarn, npx) and the CLI backend process starts successfully.
Root cause is in src/process/supervisor/adapters/child.ts:
resolveCommand calls resolveWindowsCommandShim({ command, cmdCommands: ["npm","pnpm","yarn","npx"] }) "claude" is not in the list, so the shim returns "claude" unchanged. Node spawn() on Windows can't find .cmd shims without shell: true or an explicit extension → ENOENT.

Fix: add "claude" to that cmdCommands array

Actual behavior

Spawn fails immediately for every model in the fallback chain:

[agent/cli-backend] cli exec: provider=claude-cli model=opus promptChars=984
[process/supervisor] spawn failed: reason=Error: spawn claude ENOENT
[model-fallback/decision] decision=candidate_failed requested=claude-cli/claude-opus-4-7 ... detail=spawn claude
ENOENT
... (repeats for sonnet-4-6, opus-4-6, opus-4-5, sonnet-4-5, haiku-4-5) ...
Embedded agent failed before reply: spawn claude ENOENT

OpenClaw version

2026.4.15

Operating system

Windows 11 Pro (build 10.0.26200)

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Model

claude-opus-4.7

Provider / routing chain

provider=claude-cli

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions