[Bug] remote-by-default setting incorrectly attaches new sessions to existing remote sessions

Resolved 💬 2 comments Opened Jun 2, 2026 by rodlec888 Closed Jun 5, 2026

Bug Description

## remote-by-default setting hijacks all new sessions into the first running one When "remote active by default" is enabled in settings, starting a new claude session in any terminal auto-attaches to whichever session is already running — even if the new terminal is opened in a completely different project directory. ### Expected behavior Each claude invocation starts its own session (that happens to be remote-capable). Multiple sessions can run in parallel across different projects. ### Actual behavior The first session "captures" all subsequent claude invocations. A new terminal opened in Project B and running claude gets attached to the already-running session in Project A — wrong project context, wrong CLAUDE.md, wrong working directory. ### Repro steps 1. Enable remote-by-default in settings 2. Open a terminal in Project A, run claude — session starts normally 3. Open a separate terminal in Project B, run claude 4. Observe: instead of a new session, it attaches to Project A's session ### Impact - Multi-project workflows are impossible with this setting enabled - The setting is effectively unusable — users must disable it and activate remote per-session manually - No way to opt out mid-session; the only fix is to disable the default and restart ### Workaround Disable remote-by-default; activate remote individually per session. ### Environment macOS 12.7 (Darwin 21.6.0), Claude Code CLI

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.160
  • Feedback ID: 4ec9c11c-baac-4872-a6e1-89461cfd730d

Errors

[]

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗