Summary
Once claude remote-control has registered an environment for a directory, that environment entry appears in the claude.ai/code environment picker forever. There is no CLI command, web UI action, or documented mechanism to remove it, and it does not expire. If the directory layout later changes (or a server is ever started from a different directory), the picker permanently shows duplicate entries with identical display labels, and it is impossible to tell the live one from the stale one.
Environment
- Claude Code v2.1.212, Linux x86_64, headless server accessed via SSH
- claude.ai subscription account, Remote Control enabled
Steps to reproduce
- On a server, run
claude remote-control from ~/foo (a repo checkout). An environment myhost-name-a registers and appears in the claude.ai/code picker.
- Restructure the disk layout so the checkout now lives at
~/foo/bar, and run claude remote-control from there. A second environment myhost-name-b registers.
- The picker now shows two entries with identical labels (directory basename + hostname), one permanently stale. Both display "1 of 32", so the stale one does not even look offline.
What I tried (none removed the stale entry)
- Killing the stale server process (tmux kill-session)
- Killing the daemon-hosted sessions backing it (
bg-pty-host and --session-id processes)
- Killing
claude daemon run, clearing ~/.claude/daemon* and /tmp/cc-daemon-*, then starting fresh
- Re-claiming the stale environment by starting
claude remote-control from its original directory (it correctly reused the same environment id, confirming per-directory identity), then exiting gracefully with Ctrl+C so the backend saw a clean shutdown rather than a kill
After all of the above and hard refreshes, the stale entry still shows in the picker as "1 of 32".
Expected
Any of:
- A way to remove or deregister an environment (CLI flag, or a delete action on the environment row in claude.ai/code)
- Stale environments auto-expiring after some period offline
- Offline environments visually distinguished (grayed out) in the picker instead of showing a stale capacity count
Notes
- Environment identity is stable per (machine, directory), which is great: restarts reuse the same environment id and do not accumulate entries. The problem is only that abandoned registrations are permanent and indistinguishable from live ones.
- The v2.1.200 fix note ("reconnection failure no longer creates a new session entry") addresses accidental accumulation, but abandoned registrations still have no cleanup path.
- Happy to share the environment ids and account details privately for debugging.
Summary
Once
claude remote-controlhas registered an environment for a directory, that environment entry appears in the claude.ai/code environment picker forever. There is no CLI command, web UI action, or documented mechanism to remove it, and it does not expire. If the directory layout later changes (or a server is ever started from a different directory), the picker permanently shows duplicate entries with identical display labels, and it is impossible to tell the live one from the stale one.Environment
Steps to reproduce
claude remote-controlfrom~/foo(a repo checkout). An environmentmyhost-name-aregisters and appears in the claude.ai/code picker.~/foo/bar, and runclaude remote-controlfrom there. A second environmentmyhost-name-bregisters.What I tried (none removed the stale entry)
bg-pty-hostand--session-idprocesses)claude daemon run, clearing~/.claude/daemon*and/tmp/cc-daemon-*, then starting freshclaude remote-controlfrom its original directory (it correctly reused the same environment id, confirming per-directory identity), then exiting gracefully with Ctrl+C so the backend saw a clean shutdown rather than a killAfter all of the above and hard refreshes, the stale entry still shows in the picker as "1 of 32".
Expected
Any of:
Notes