Skip to content

[Bug]: acpx fails to spawn Claude CLI on Windows #50352

@alerlocked

Description

@alerlocked

Bug type

Regression (worked before, now fails)

Summary

acpx fails to spawn Claude Code CLI on Windows 10, despite Claude CLI being installed, configured, and working when invoked directly. Error message: "Failed to spawn agent command: C:\Users\alerl.local\bin\claude.exe"

Steps to reproduce

  1. Install acpx via OpenClaw extension (cd openclaw/extensions/acpx && npm install)
  2. Configure acpx with Claude CLI path in ~/.acpx/config.json
  3. Verify Claude CLI works: claude --version returns 2.1.50
  4. Try to spawn via acpx: node dist/cli.js claude exec "test"
  5. Observe error: "Failed to spawn agent command: C:\Users\alerl.local\bin\claude.exe"

Expected behavior

acpx should successfully spawn Claude CLI on Windows, just as it does on Unix systems. Claude CLI should respond to the prompt.

Actual behavior

acpx fails with error "Failed to spawn agent command: C:\Users\alerl.local\bin\claude.exe". OpenClaw Gateway logs show acpx runtime backend is registered and ready, but Runtime status shows "unknown". Direct invocation of claude.exe works perfectly: claude --print "test" returns expected output.

OpenClaw version

2026.3.12

Operating system

Windows 10 (x64)

Install method

npm global (OpenClaw) + npm install in extensions/acpx

Model

NOT_ENOUGH_INFO (acpx spawn failure is independent of model)

Provider / routing chain

NOT_ENOUGH_INFO (acpx spawn failure occurs before model routing)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: Windows users trying to use acpx with Claude CLI
Severity: High (blocks OpenClaw Sessions functionality on Windows)
Frequency: 100% (always fails on Windows)
Consequence: Cannot use OpenClaw Sessions with Claude on Windows; must fall back to direct exec() calls which bypass session management, tracking, and Control Center integration

Additional information

Temporary workaround: Use exec("claude --print --permission-mode bypassPermissions \"prompt\"") directly, which works reliably but bypasses OpenClaw Sessions.

Possible causes:

  1. Windows path handling (backslashes vs forward slashes)
  2. Permission issues when spawning processes
  3. Environment variables not inherited by acpx runtime
  4. Node.js spawn() behavior differences on Windows

Happy to provide additional debugging information if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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