Remote Control: environment lifecycle — stale environments accumulate, are indistinguishable from live ones, and cannot be removed
Open 💬 0 comments Opened Jul 12, 2026 by drakontas-hgbot
Environment
Claude Code 2.1.207, Windows 11, claude remote-control server mode (same-dir spawn), claude.ai/code + Android app clients.
Problem
Each claude remote-control server instance registers a new environment (env_01…) in the claude.ai / mobile environment picker. In practice environments accumulate and the picker becomes unusable:
- Restarts mint new environment ids. A watchdog-restarted server (same
--name, same directory) registers a fresh environment every time; observed 4 environment ids for one logical server in a day.--continue/--session-idcannot serve as a reattach mechanism: they hard-conflict with--spawn/--capacity/--[no-]create-session-in-dir(including the--no-negation) and refuse to start when the directory has no prior session history — which is exactly the state of a freshly-healed 0-session server. - Dead environments are not removable. No affordance exists in the mobile app or claude.ai/code (hover/right-click/context tested), and none is documented.
- Dead environments are indistinguishable from live ones. Status dots remained green for environments whose server processes had been dead for an hour; the picker shows hostname + directory but not the server's
--name, so multiple entries for one directory are identical. A user picked a dead entry and their session hung indefinitely with no error.
Requests (any subset helps)
- A way to remove or archive stale environments from the picker (UI or CLI).
- Stable environment identity across server restarts (reattach by name+directory, or documented use of the
bridge-pointer.jsonmechanism that already appears to re-adopt environments when orphaned sessions exist). - Accurate liveness indication in the picker, and surfacing the server
--nameto disambiguate same-directory entries. - Documented environment lifecycle semantics in remote-control.md (currently unspecified per the docs).
🤖 Filed with Claude Code on the user's behalf