[Bug] Remote-control-by-default causes cross-project session hijacking + background-job misclassification (recurrence of #64635, #64659, #64640)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 3, 2026

Summary

This is a recurrence of three previously-closed-but-unfixed issues: #64635, #64659, #64640.
All three were closed by the stale-bot or as "duplicate" without an actual fix landing, and the
exact same cluster of symptoms is reproducible today across unrelated projects.

Environment

  • Claude Code v2.1.220
  • macOS Darwin 21.6.0
  • Multiple projects, launched normally from separate terminals (claude CLI, no scheduling, no

explicit background/remote flag passed)

Symptoms observed (same session)

  1. Background-job misclassification — a plain interactive session (opened via claude in a

terminal, typing normally) has # Background Session injected into its system prompt, stating
"This session runs as a background job," including a CLAUDE_JOB_DIR path. This triggers the
bgIsolation worktree guard, forcing EnterWorktree + branch + PR for any file edit, even
though nothing about the session was started as a background/scheduled job.

  1. Confirmed cross-project, not a per-repo setting — reproduced in two entirely separate

project directories (Project A, Project B), neither sharing any project-level config that would
explain it. Ruled out: a project-specific experimental flag set in one project's
.claude/settings.json — the other affected project has no such flag, yet shows identical
misclassification.

  1. Session dashboard cross-project hijack — a multi-session overview/dashboard (listing all

active Claude Code sessions with status: awaiting input / working / completed) contains an
entry labeled bg. Clicking it did nothing on the first click; a second click triggered a
session restart — a blank screen, then garbled/fragmented ASCII rendering, then a clean restart
— landing in Project C, a project unrelated to the one the click originated from.

Suspected root cause

Matches #64659's exact described mechanism: a "remote-by-default" / remote-control state appears
to be active, causing new session starts to attach to or be captured by an already-running remote
session in a different project, rather than starting independently. #64640 describes the
downstream effect: remote-control sessions incorrectly inherit worktree-isolation/background-job
defaults, which matches symptom (1) above.

Checked remoteControlAtStartup in the global settings file — currently false — so either:
(a) a separate toggle controls this (accessible via the app UI, not reflected in that settings
field), or (b) an already-running remote-attached session elsewhere is acting as the "capturing"
session per #64659's mechanism, independent of the startup-default flag's current value.

Expected behavior

  • A session started normally via claude in a terminal should never receive background-job

framing or the bgIsolation guard unless explicitly launched as a background/scheduled task.

  • Each claude invocation should start its own independent session, never attach to or get

captured by a session running in a different project directory.

  • Dashboard UI elements should not trigger cross-project session navigation as a side effect of

an ambiguous/unlabeled click target.

Notes for triage

#64635, #64659, and #64640 were all closed without a shipped fix (stale-bot auto-close /
duplicate-close). This report consolidates them because reproducing today shows the same root
mechanism causing all three symptoms together, not three independent bugs.

View original on GitHub ↗