remote-control session fails: node bad option --sdk-url

Resolved 💬 3 comments Opened Feb 26, 2026 by petr-pixel Closed Mar 2, 2026

Bug Description

claude remote-control connects successfully but the session immediately fails with:

Session failed: /Users/petr/.nvm/versions/node/v22.22.0/bin/node: bad option: --sdk-url session_01JnsxdUy1WMaLykiaaR2wVG

It appears that --sdk-url is being passed as a Node.js CLI argument rather than as an argument to the Claude Code script when spawning the session subprocess.

Steps to Reproduce

  1. Run claude remote-control
  2. Session connects briefly ("Connected · petr · HEAD")
  3. Session immediately fails with the bad option: --sdk-url error

Environment

  • Claude Code version: 2.1.61
  • Node.js versions tested: v22.22.0 (nvm), v20.20.0 (nvm) — same error on both
  • OS: macOS (Darwin 25.2.0, Apple Silicon)
  • Install method: npm global (sudo npm install -g @anthropic-ai/claude-code)

Expected Behavior

The remote-control session should stay connected and be accessible from claude.ai/code or the Claude mobile app.

Actual Behavior

The session connects momentarily but then crashes because --sdk-url is not a valid Node.js flag. The full output:

·✔︎· Connected · petr · HEAD

Continue coding in the Claude app or https://claude.ai/code/session_01JnsxdUy1WMaLykiaaR2wVG?bridge=env_01Nupfyi4WJKWFK2bKzHcYqT
space to show QR code

[23:34:26] Session failed: /Users/petr/.nvm/versions/node/v22.22.0/bin/node: bad option: --sdk-url session_01JnsxdUy1WMaLykiaaR2wVG
[23:34:26] To reconnect: claude --resume session_01JnsxdUy1WMaLykiaaR2wVG

View original on GitHub ↗

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