Remote-control bridge spawn missing cli.js script path in child process args

Resolved 💬 3 comments Opened Mar 2, 2026 by zqchris Closed Mar 6, 2026

Bug Description

When the remote-control bridge spawns a child session, it uses process.execPath (the Node.js binary) with an args array that starts with ["--print", "--sdk-url", ...]. This is missing the cli.js script path as the first argument.

Node.js interprets --print as its own -p flag and consumes it, then treats --sdk-url as a Node option, resulting in:

bad option: --sdk-url

Expected Behavior

The args array should include process.argv[1] (the cli.js script path) as the first element so Node.js knows to run the script rather than interpret subsequent args as Node options.

Location

cli.js — the minified bridge spawn code:

// Current (broken):
let $=["--print","--sdk-url"...

// Fixed:
let $=[process.argv[1],"--print","--sdk-url"...

Environment

  • Claude Code: installed via npm (@anthropic-ai/claude-code)
  • Node: v22.22.0
  • Triggered via: OpenClaw remote-control integration

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗