Skip to content

fix: add "claude" to Windows cmdCommands shim allowlist#68849

Closed
tianhaocui wants to merge 3 commits intoopenclaw:mainfrom
tianhaocui:fix-windows-claude-cmd-shim
Closed

fix: add "claude" to Windows cmdCommands shim allowlist#68849
tianhaocui wants to merge 3 commits intoopenclaw:mainfrom
tianhaocui:fix-windows-claude-cmd-shim

Conversation

@tianhaocui
Copy link
Copy Markdown
Contributor

Fixes #68788

Summary

resolveWindowsCommandShim resolves .cmd shims for Node spawn() on Windows. The allowlist includes npm, pnpm, yarn, npx but is missing claude, causing spawn claude ENOENT when routing to the claude-cli provider.

Changes

Added "claude" to the cmdCommands array in src/process/supervisor/adapters/child.ts.

Test Plan

  • On Windows with claude.cmd on PATH, verify provider=claude-cli model calls succeed
  • On non-Windows, no behavior change (resolveWindowsCommandShim is a no-op)

On Windows, Node spawn() cannot resolve .cmd shims without shell:true
or an explicit extension. resolveWindowsCommandShim handles this for
npm/pnpm/yarn/npx but "claude" was missing from the list, causing
spawn claude ENOENT when routing to the claude-cli provider.

Fixes openclaw#68788
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 19, 2026

Greptile Summary

Adds "claude" to the cmdCommands allowlist in resolveWindowsCommandShim, fixing ENOENT errors when spawning the claude-cli provider on Windows. The function is a no-op on non-Windows platforms, so this change has no cross-platform impact.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no cross-platform side effects.

Single-line addition to an allowlist with a well-understood, deterministic function. Non-Windows behavior is unchanged. No logic issues or security concerns.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: add "claude" to Windows cmdCommands..." | Re-trigger Greptile

@prtags
Copy link
Copy Markdown

prtags Bot commented Apr 23, 2026

Related work from PRtags group patient-piglet-45hj

Title: Open PR duplicate: Windows claude cmd shim spawning

Number Title
#68792 fix(process): shim claude on Windows child spawns
#68819 fix: resolve Windows .cmd shims to underlying .exe before spawn
#68849* fix: add "claude" to Windows cmdCommands shim allowlist

* This PR

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 26, 2026

Closing this as duplicate or superseded after Codex automated review.

PR #68849 is a narrow allowlist-only duplicate for the Windows Claude CLI shim bug. Current main still has the bug, but open PR #68819 supersedes this PR by tracking the full supervisor .cmd shim fix plus regression coverage.

Best possible solution:

Close PR #68849 as superseded and keep the remaining review on #68819, or an equivalent full core patch that handles supervisor Windows .cmd shim resolution and regression tests rather than only adding claude to the allowlist.

What I checked:

So I’m closing this here and keeping the remaining discussion on the canonical linked item.

Codex Review notes: model gpt-5.5, reasoning high; reviewed against c7a0d9b1889c.

@clawsweeper clawsweeper Bot closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant