Expose remote control URL via file/env var for scripting

Resolved 💬 2 comments Opened Mar 19, 2026 by kevinchang-art Closed Apr 16, 2026

Problem

When remoteControlAtStartup is enabled (or /remote-control is run), the remote control URL is only available in-memory and displayed in the UI. There's no way to programmatically access it from:

  • A file on disk
  • An environment variable
  • Debug logs
  • Session files
  • Any CLI command

This makes it impossible to build automation around remote control, such as a custom skill that automatically sends the remote control URL to a Google Chat webhook.

Current workaround (doesn't fully work)

  1. Enable remoteControlAtStartup via /settings
  2. Run /remote-control manually to display the URL in the conversation
  3. Run a custom skill to send it to Google Chat

The user still has to run two commands. The URL from remoteControlAtStartup is never exposed to the conversation or any accessible location.

Proposed solutions (any one would unblock this)

  1. Write the remote control URL to a file (e.g., ~/.claude/sessions/<pid>.json or a dedicated file like ~/.claude/remote-control-url) when remote control connects
  2. Set an environment variable (e.g., CLAUDE_REMOTE_CONTROL_URL) in the shell environment available to hooks and skills
  3. Include the URL in SessionStart hook stdin data when remoteControlAtStartup is enabled
  4. Add a CLI flag like claude --remote-control-url that prints the URL of the current session's remote control
  5. Allow skills to invoke built-in slash commands so a skill could call /remote-control programmatically

Use case

I have a custom skill (/remote-control-send-to-chat) that sends the remote control URL to a Google Chat space via webhook. I want it to be a single command — run the skill and it handles everything. Currently this is impossible because the URL is trapped in-memory.

🤖 Generated with Claude Code

View original on GitHub ↗

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