[FEATURE] Machine-level Remote Control — survive session death natively

Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 16, 2026

The problem

Remote Control is session-bound: it can only be started from the Mac (claude --remote-control), and it lives exactly as long as that one process. Laptop lid closes, Mac sleeps, network drops long enough — the session archives, and unarchiving does nothing because there is no live process behind it. From the phone there is no recovery path: the tool that died is the only tool that could have relaunched itself.

What we had to build instead (the evidence)

A self-hosted resurrection stack, assembled by hand in one evening:

  • Tailscale + SSH (Remote Login) as an API-independent channel onto the Mac
  • tmux as the session keeper, with a .zshrc auto-attach so SSH logins land in the session
  • A launchd watchdog (rc_watchdog.sh, every 5 min) that detects a dead RC process and relaunches claude --remote-control in tmux — with an offline gate, failure backoff, and a busy-pane guard so it converges instead of looping
  • Along the way: two macOS TCC traps (launchd's bash can't read iCloud Drive paths; tmux needed its own iCloud grant)

It works. It also required a runbook, a VPN, a daemon, and three permission dialogs — for what is conceptually one checkbox: "keep this machine reachable."

The ask

A machine-level Remote Control mode: a lightweight, signed, Mac-side agent (LaunchAgent, menu-bar item, or a mode of the desktop app) that:

  1. Registers the machine, not a session, with the user's account
  2. Spins up / resumes CLI sessions on demand from the phone's Code tab
  3. Auto-re-registers after sleep, network loss, or reboot — no human at the Mac
  4. Exposes basic health ("last seen, awake, reachable") in the phone UI

The desktop app already runs persistently and holds the right TCC grants — it is most of the way to being this agent.

Who benefits

Anyone using Claude Code as a persistent workspace brain rather than a one-shot terminal tool — and especially phone-first users whose Mac is at home. The current design punishes exactly the users most invested in Remote Control.

---

Distilled from a real working session on 2026-07-15 — the evening spent armoring Remote Control against session death. Happy to share the runbook and watchdog as a reference implementation. Companion request from the same session: model-fluid delegation profile (filed separately).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗