--remote-control is silently ignored in print/stream-json mode (session never registers)
Summary
--remote-control [name] has no effect when Claude Code runs in print/SDK mode (-p, --input-format stream-json --output-format stream-json). The session never registers as a Remote Control session, and no warning is printed. --help describes the flag as "Start an interactive session with Remote Control enabled", so this may be by design. But wrappers that drive Claude Code over stream-json (for example the Happy mobile client's remote mode, see below) pass the flag and silently lose Remote Control.
Versions
- Claude Code 2.1.285 (macOS, Homebrew cask)
- Happy CLI 1.2.5 (npm
happy)
Repro
- Start a session interactively:
claude --resume <session-id> --name Example --remote-control Example. It appears as a Remote Control session, and other machines on the same account can see and message it. - Let the same session be driven over stream-json. Happy does this when the phone takes over, starting:
claude --output-format stream-json --input-format stream-json --permission-prompt-tool stdio --resume <session-id> ... --name Example --remote-control Example
- Observed: the session no longer appears as a Remote Control session on other machines, though the process is alive and working. Switching back to the interactive form brings it back.
Expected
Either:
- Remote Control works in print/stream-json mode when
--remote-controlis passed; or - the flag is rejected or warned about in that mode, so a wrapper knows it has lost Remote Control instead of finding out from a missing session.
Impact
A long-running session that a mobile client drives over stream-json becomes unreachable by Remote Control (and by other sessions that message it through it) for as long as it is in that mode.