[BUG] VS Code extension: repeated Remote Control (re)registration mints a fresh session codename each time — Local tab fills with near-simultaneous duplicate rows
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In the Claude mobile/companion app's session picker, the Local tab (which lists Remote-Control-discoverable sessions on the current machine) showed seven distinct entries, all sharing the same hostname prefix (dhcp-10-31-183-152-dyn-mit-edu-) but each with a different auto-generated <adjective>-<noun> codename (e.g. abstract-sloth, misty-sloth, enumerated-flute, steady-heron, keen-newt, mellow-lighthouse, composed-seal). Six were timestamped "1m" (last active) and one "2m" — i.e. they all appeared within about two minutes of each other, on the same machine, from the same network identity.
At no point did the reporter have seven distinct real Claude Code windows/sessions open on that machine. The strong suspicion, based on the auto-naming behavior documented for Remote Control (a fresh <hostname>-<adjective>-<noun> name is minted whenever a session has no explicit name/title and no meaningful history yet — i.e., before any real conversation happens), is that each (re)registration attempt for Remote Control minted a brand-new session identity instead of reusing/replacing a prior one for the same underlying editor session — the same general defect class reported in #83378 (closed) and #83193 (open), but observed here from the VS Code extension rather than the Desktop app, with no unclean-termination (crash/reboot) trigger, and with far more duplicate rows (7 within ~2 minutes) than the single stale row described in #83378.
Because these throwaway sessions never accumulate real conversation history, they keep their auto-generated codename forever and just pile up as unremovable clutter in the Local list.
(For context: one other entry in the same list, node3804-compiled-hopcroft, initially looked equally suspicious but was confirmed by the reporter to be a legitimate session from an unrelated SSH-connected host — included here only to clarify that the report is specifically about the 7 near-simultaneous same-host duplicates, not the whole list.)
What Should Happen?
Repeated or failed Remote Control (re)registration attempts from what is effectively the same editor session should reuse/replace an existing Local-tab entry rather than minting a new session identity (and new auto-generated codename) each time. At minimum, there should be a way to clear stale/duplicate entries from the Local tab.
Error Messages/Logs
None surfaced to the user client-side; no error dialog or notification accompanied the duplicate registrations.
Steps to Reproduce
The reporter did not capture the exact trigger live (it was noticed after the fact from the session list), so these steps are best-effort/inferred rather than confirmed:
- Use Claude Code via the VS Code extension on macOS, on a laptop whose network identity resolves to a DHCP hostname (e.g.
*.dyn.mit.edu). - Over normal use of the extension (opening/reloading windows, extension host restarts, brief network changes, etc.), allow Remote Control registration to be attempted multiple times without any single session ever being cleanly closed/retired.
- Open the companion app's session picker and select the Local tab.
- Observe multiple entries sharing the same hostname prefix but different auto-generated
<adjective>-<noun>codenames, all with very recent "last active" timestamps, exceeding the number of real concurrent editor sessions on that machine.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Unable to confirm via claude --version (CLI not resolvable on PATH in the environment used to investigate this). The latest Claude Code VS Code extension build present on the reporter's machine is 2.1.258 (darwin-arm64).
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Note: more precisely this is the Claude Code VS Code extension side panel, not a terminal-invoked CLI session — the dropdown has no exact option for that.
Additional Information
Related issues (same general "duplicate/stale Remote Control session" defect family, but distinct triggers/clients):
- #83378 (closed) — Desktop app: re-arming Remote Control after unclean termination never retires the dead bridge handle, leaving one permanent duplicate row.
- #83193 (open) — Remote Control sessions disconnect over time and
/remote-controlthrows instead of reconnecting. - #59242 —
/resumelist shows duplicate-named, indistinguishable entries (different feature, same "can't tell duplicates apart" symptom).
This report differs from #83378 in three ways: (a) client is the VS Code extension, not the Desktop app; (b) no crash/reboot/unclean-termination was observed as a trigger; (c) the duplicate count (7 rows within ~2 minutes) is much higher than the single stale row in #83378, suggesting either repeated automatic re-registration attempts or a lower-level retry loop, rather than a one-off re-arm-after-crash path.