Remote Control: same Mac shows as two Active devices in mobile app (stale environments; name deduped with -2 suffix); sessions split between them

Status Open
Reported on v2.1.212
Maintainer reply None cached
Activity 0 comments · opened Jul 21, 2026

Summary

The same Mac appears as two separate "Active" devices in the Claude mobile app's Code tab (e.g. Mac and MacBook-Pro-2), and sessions are split between the two entries. A session started on the machine is then invisible under whichever device entry the user happens to open, making it look like the conversation disappeared.

Environment

  • Claude Code 2.1.212, native install, macOS 26.5 (Apple Silicon, MacBook Pro)
  • Remote Control launched by a launchd supervisor: claude remote-control --name <name> in a fixed project directory
  • Claude Desktop app also running on the same machine

What we verified locally (before filing)

  • Local config uses exactly one name everywhere (--name MacBook-Pro); the strings Mac / MacBook-Pro-2 do not exist anywhere in local scripts, state, or ~/.claude* — the duplicate naming is server-side.
  • Local state persists and restores a single environment pointer across restarts (same env_01UG… re-registered every time, confirmed in logs: "re-registered with the same environment").
  • However, the account has accumulated several older environments from the same machine (one from a home-dir launch ~10 days ago, one from a test directory, one superseded predecessor of the current env). These stale registrations still exist server-side.

Suspected cause

  1. Stale device/environment records for the same physical machine are never garbage-collected server-side, and at least one still reads as Active in the mobile app.
  2. A new registration whose display name collides with a stale record gets deduplicated with a -2 suffix (MacBook-Pro-2), so the same Mac accumulates differently-named device entries over time.
  3. The mobile app's Sessions list is scoped per device entry by default, so sessions "disappear" depending on which entry is selected. (Workaround: Sessions → All shows everything.)

Expected

  • One physical machine (same machine identity / same account) should collapse into one device entry, or stale entries should expire once superseded.
  • At minimum, stale environments should not render as "Active".

Repro sketch

  1. Run claude remote-control from different directories over a few days (supervisor restarts, an experiment in a test dir, etc.) on the same Mac.
  2. Open the Claude mobile app → Code → Devices: the same Mac shows as multiple Active devices; sessions are split between them.

Happy to provide full environment IDs / timestamps privately if useful for debugging.

View original on GitHub ↗