VS Code sessions spontaneously split, swap, and duplicate between panels
Bug Report — High Priority
Problem
Claude Code sessions in VS Code are spontaneously splitting and swapping between open panels without user action. This results in:
- Session splitting — A single session suddenly appears in two different VS Code Claude panels
- Session swapping — A panel that was connected to session A suddenly starts showing session B
- Ghost sessions — New session files appear in
~/.claude/projects/that the user never created - Session duplication — Multiple Claude binary processes attach to the same session ID (confirmed via
ps aux | grep resume)
Impact
- Users lose track of which panel is connected to which session
- Work in progress vanishes when a panel swaps to a different session
- Multiple processes writing to the same JSONL file causes data corruption and crashes
- Combined with the "Prompt is too long" bug (#25274), this makes Claude Code nearly unusable for multi-session workflows
Evidence from a single user session (Feb 12, 2026)
Duplicate processes on same session:
PID 71397 --resume c615748f (started 9:55 PM, active)
PID 78674 --resume c615748f (started 11:07 PM, zombie)
PID 81142 --resume c615748f (started 11:21 PM, zombie)
Three processes all attached to the same session file, spawned at different times without user action.
Ghost sessions: User had 4 active sessions. After a short period, 5 additional session files appeared that the user did not create. Several contained only the <ide_opened_file> system reminder — suggesting the extension spawned new sessions when broadcasting file-open events.
Session swapping: User's Infrastructure session (actively editing MD files) vanished from its panel. The work appeared in a different session file with a different first message ("Finder + Client Modules"), suggesting the panel swapped mid-conversation.
Environment
- Claude Code v2.1.39 (VS Code extension, macOS)
- VS Code with 4-5 Claude panels open simultaneously
- macOS Darwin 25.2.0
Severity
High — This makes multi-session workflows (the primary use case for VS Code panels) unreliable. Users cannot trust that their panel is connected to the correct session, and work disappears without warning.
Related
- #25274 (tool results embed full file content)
- #24709 (session ID not visible in tab titles)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗