Feature request: expose CLAUDE_REMOTE_CONTROL env var in Bash tool when remote control is active
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 2 comments · opened Mar 24, 2026 · closed Apr 23, 2026
Problem
When Claude Code is used via the Anthropic app's remote control feature, tools like AskUserQuestion render interactive terminal UIs (arrow keys + Enter to select) that the user cannot interact with — the remote control interface only supports text input.
Third-party skills (e.g., gstack) need a way to detect remote control mode so they can gracefully degrade to plain text alternatives.
Current workarounds (and why they fail)
- TTY detection (
tty/test -t 0): Claude Code's Bash tool never has a real TTY attached, so this always reports "no TTY" — even in normal terminal mode. Unreliable. - Session token inspection: The JWT contains
"application": "ccr"for remote control sessions, but this persists even after disconnecting. Not real-time. - Manual toggle: Works but requires users to remember to enable/disable. Poor UX.
Proposed solution
Set an environment variable in the Bash tool's execution environment when remote control is active:
CLAUDE_REMOTE_CONTROL=1
This would allow any tool, skill, or script to detect remote control mode and adapt behavior accordingly (e.g., fall back to plain text questions instead of interactive TUI prompts).
Context
- gstack PR implementing the manual workaround: https://github.com/garrytan/gstack/pull/459
- This likely affects any Claude Code skill/tool that uses
AskUserQuestionor other interactive terminal features
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗