[Feature Request] Emit the existing remote.session_id statusline payload field for local Remote Control sessions

Status Open
Reported on v2.1.232
Maintainer reply None cached
Activity 0 comments · opened Aug 14, 2026

Feature request

Emit the existing remote.session_id status-line payload field when a local session has Remote Control connected.

Context

#31840 asked for RC connection status via a state file or CLI flag and was closed not-planned. This is a much smaller ask with new evidence: the field already exists in the code — it just doesn’t fire for the local-RC case.

The 2.1.232 payload builder constructs the status-line JSON with a conditional field:

...bd() !== null && {remote: {session_id: e.id}}

but with a Remote Control session actively connected to a local interactive session, that field is not emitted (it appears to be gated on cloud/bridge-hosted sessions instead).

What I verified on 2.1.232 (macOS), with RC connected

Building an RC indicator for a custom status line (claude-rocketline), I checked every surface a status-line script could read. All negative:

  • Status-line stdin payload — no RC field (captured live; remote absent).
  • Environment — no RC-related variable in the status-line subprocess (CLAUDE_CODE_REMOTE_SESSION_ID is the cloud-environment/agent-proxy one, not RC).
  • Disk — nothing under ~/.claude changes on connect. ~/.claude/sessions/<pid>.json has bridgeSessionId, but long-idle non-RC sessions carry it too, so it’s the claude.ai session-sync link, not live RC state.
  • Hooks — no RC-related event in the hook set.
  • CLIclaude remote-control only starts headless sessions; no status subcommand.
  • Network — the RC websocket can’t be distinguished by endpoint; claude.ai and api.anthropic.com resolve to the same IP here.

So RC connection state is currently observable nowhere outside the UI’s memory.

Why

Status lines are exactly where “this session is being remote-controlled right now” belongs — the built-in footer /rc badge is not customizable, and custom status lines get no signal at all. Flipping the existing remote field on for local RC sessions (set on connect, removed on disconnect) would close the gap with no new surface area: the schema, the field, and the plumbing already exist.

My indicator ships wired-but-dormant, keyed to remote.session_id — happy to test whatever shape lands.

View original on GitHub ↗