[BUG] Remote Control environments stay green/online and duplicate on mobile after all local processes exit
[BUG] Remote Control environments stay green/online and duplicate on mobile after all local processes exit
Description
Claude mobile's Select environment sheet continues to show stale Remote Control environments as green/online even after every local Claude Code process, Remote Control server, tmux session, and Claude daemon on the WSL host has been stopped. Restarting claude remote-control creates another visible environment with the same display name, while the previous entries remain green/online, so the mobile environment list accumulates duplicates.
This makes it impossible to tell which environment, if any, is actually reachable from mobile.
Environment
- Claude Code version:
2.1.193 (Claude Code) - Host: Linux / WSL
- Client: Claude mobile app, Select environment sheet for a Claude Code session
- Remote Control server command shape used before stopping:
claude remote-control --name ws/<project> --spawn same-dir - Auth method: Claude account / Claude Max (
claude auth status --jsonshowedauthMethod: claude.ai) - Relevant docs consulted:
- https://code.claude.com/docs/en/remote-control
- https://code.claude.com/docs/en/corporate-proxy
Timeline / Reproduction
All times below are 2026-06-26 in CST / UTC+8.
- Mobile Select environment initially showed duplicate entries for the same WSL machine and project names, all with green status dots. Affected display names included:
NERV custom-user-js-scriptsNERV cc-session-controlNERV dingtalk-automationNERV dingtalk-inventory-check-assistant- plus
NERV ops-runbooksandNERV local-workspace
- Around
13:40, global~/.claude/settings.jsonwas changed from"remoteControlAtStartup": truetofalseto avoid interactive sessions auto-registering Remote Control. - All managed Remote Control servers were stopped and verified absent locally.
- Starting the managed servers once again caused the mobile list to grow from two copies of several project environments to three copies. Local process sampling still showed only one
claude remote-control --name ws/<project>process per project. - At about
13:44, all managed Remote Control servers were stopped again. - At
13:55, the host still had zero managedclaude remote-control --name ws/...processes, but mobile still showed the duplicate stale entries as green/online. - The remaining ordinary interactive Claude Code process in
ops-runbookswas then terminated. - At
14:10,claude daemon stop --anyreportedno daemon runningandclaude agents --jsonreturned[]. - At
14:18, mobile still showed all stale environments as green/online, includingops-runbooksandlocal-workspace, even though the WSL host had no Claude Code process remaining.
Local evidence after cleanup
At 2026-06-26 14:18:03 CST, the local WSL host state was:
$ claude agents --json
[]
$ pgrep -ax claude
# no output after the transient inspection command completed
$ pgrep -af '^claude remote-control --name ws/'
# no output
$ tmux list-sessions -F '#S #{session_windows}'
no server running on /tmp/tmux-1000/default
$ csctl rc status
[stopped] JHenTai
[stopped] Joplin-custom
[stopped] auto cc-session-control
[stopped] auto custom-user-js-scripts
[stopped] auto dingtalk-automation
[stopped] auto dingtalk-inventory-check-assistant
[stopped] dingtalk-policy-assistant
[stopped] gpt_image_playground
[stopped] auto local-workspace
[stopped] auto ops-runbooks
[stopped] trellis-workflows
[stopped] xiaomi-youruijia-training-workspace
$ ss -tnp | rg 'users:\(\("claude"|api\.anthropic|160\.79\.104'
# no output
I also checked broader process patterns such as .local/share/claude, .claude, claude-code, anthropic, and Claude Code; only the shell/grep processes for the inspection command itself appeared.
Expected behavior
When the local Remote Control process exits, the corresponding environment should either:
- disappear from the mobile/web environment selector, or
- transition to offline / unavailable within the documented timeout window.
If a new Remote Control process starts later with the same display name, old entries should not remain green/online indefinitely.
Actual behavior
The mobile app continues to show multiple duplicate environments with green/online dots more than 30 minutes after all local Claude Code processes and daemons on the WSL host were stopped. Restarting Remote Control increases the number of duplicate visible environments.
Notes
Before the final cleanup, the Remote Control tmux panes had shown frequent reconnect messages such as Reconnected after 3s, Reconnected after 6s, and similar. The host uses standard HTTP_PROXY / HTTPS_PROXY pointing to a local proxy, and also had ALL_PROXY=socks5h://127.0.0.1:7897 in the environment. Even if reconnects contributed to duplicate registration, stale entries should not remain green/online after the local process is gone and there are no claude network connections.
Impact
- The mobile environment picker becomes cluttered with duplicate stale environments.
- Users cannot determine which entry, if any, maps to a live local host.
- Starting Remote Control again risks selecting an old stale entry and further multiplying the list.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗