remote-control fails with `node: bad option: --sdk-url`
Resolved 💬 3 comments Opened Feb 26, 2026 by dimitrijpet Closed Mar 3, 2026
Bug
claude remote-control connects successfully but immediately fails when spawning the child session:
$ claude remote-control
·✔︎· Connected · implications-framework · mobile-debug
Continue coding in the Claude app or https://claude.ai/code/session_01xxx
[13:21:06] Session failed: /home/dimitrij/.nvm/versions/node/v20.19.0/bin/node: bad option: --sdk-url session_01xxx
Root cause
The subprocess appears to be spawned as node --sdk-url <session_id> (without pointing to the CLI script), so Node.js interprets --sdk-url as its own flag and rejects it. It should be node /path/to/cli.js --sdk-url <session_id>.
Verified by testing directly:
# This fails (no script specified):
$ node --sdk-url test
node: bad option: --sdk-url
# This works (script specified before the flag):
$ node -e "console.log(process.argv)" -- --sdk-url test
[ '/usr/bin/node', '--sdk-url', 'test' ]
Environment
- Claude Code: 2.1.59 (installed via
npm install -g @anthropic-ai/claude-code) - Node.js: tested on v20.19.0 and v22.22.0 — same result on both
- OS: Linux (Ubuntu, kernel 6.8.0-100-generic)
Reproduction
- Run
claude remote-control - Session connects successfully, displays the session URL
- Immediately crashes with
node: bad option: --sdk-url <session_id> - Suggests
claude --resume <session_id>but the session was never created
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗