[FEATURE] Machine-level Remote Control — survive session death natively
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
.zshrcauto-attach so SSH logins land in the session - A launchd watchdog (
rc_watchdog.sh, every 5 min) that detects a dead RC process and relaunchesclaude --remote-controlin 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:
- Registers the machine, not a session, with the user's account
- Spins up / resumes CLI sessions on demand from the phone's Code tab
- Auto-re-registers after sleep, network loss, or reboot — no human at the Mac
- 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).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗