[FEATURE] Expose remote control status in statusline JSON
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The statusline JSON payload provides useful session metadata (model, context window, cost, session ID), but there's no way to determine whether remote control is enabled or whether a remote client is actively connected.
The terminal TUI does show a "Remote Control active" indicator (recently fixed for inconsistent color in v2.1.69), but this display appears inconsistently — it doesn't always render reliably, and more importantly, it's not accessible to custom statusline scripts. Users who customize their statusline via the statusLine setting have no way to include remote control state.
The only way to know if remote control is on is to remember whether you ran /remote-control, which is error-prone when managing multiple terminal sessions.
Proposed Solution
Option A (preferred): Add a remote_control object to the statusline JSON input:
{
"remote_control": {
"enabled": true,
"connected": true
}
}
enabled— whether remote control has been activated for this session (via/remote-control,claude remote-control, or the "Enable Remote Control for all sessions" config option)connected— whether a remote client is currently connected (if trackable; omit or null if not feasible)
If connection state is too complex to expose, even just enabled would be valuable.
Option B (acceptable alternative): Ensure the existing TUI "Remote Control active" indicator is always visible when remote control is enabled, rather than appearing sporadically. This would at least give users a reliable visual signal, even if it's not available to custom statusline scripts.
Alternative Solutions
- Relying on the existing TUI "Remote Control active" indicator — but this isn't exposed to custom statusline scripts and appears inconsistently
- Manually tracking which sessions have remote control enabled — error-prone across multiple terminals
- No file, environment variable, or socket exists to detect this state externally
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
- I customize my statusline to show model, context usage, git branch, and session name
- I start a long-running task and enable
/remote-controlso I can monitor from my phone - I switch terminal tabs and later forget which sessions have remote control enabled
- With this feature, my statusline would show a visual indicator (e.g., "RC" with a color change) when remote control is active, and optionally shift color when a client is connected
- This saves me from accidentally leaving sessions remotely accessible or wondering which session to connect to from console.anthropic.com
Additional Context
The TUI already tracks this state internally (the "Remote Control active" indicator exists and was recently color-fixed). Exposing the same boolean to the statusline JSON should be a small addition.
---
✍️ This issue was drafted by Claude Code with human review and approval.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗