claude-code - 💡(How to fix) Fix "Opened changes in VS Code" prints even when current process does not own the IDE websocket (multi-session scenarios)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When multiple Claude Code sessions run concurrently against the same VS Code instance, all sessions print "Opened changes in VS Code" after an edit, but only one session's diff actually opens — the one that won the WebSocket connection to the IDE extension. Other sessions print the message but nothing happens.

Root Cause

Environment

  • claude-code 2.1.146 (also 2.1.144/2.1.145 present from older sessions)
  • macOS Darwin 25.5.0
  • VS Code with Claude Code extension
  • Terminal: cmux (pre-warms claude processes via --bg-spare/--bg-pty-host, which likely amplifies the multi-session count, but the root cause is independent of cmux)

Fix Action

Workaround

Close other claude sessions so only one remains, then VS Code routes correctly.

Code Example

Code Helper 57246  TCP 127.0.0.1:57000 (LISTEN)
  Code Helper 57246  TCP 127.0.0.1:57000->127.0.0.1:62653 (ESTABLISHED)
  claude      85242  TCP 127.0.0.1:62653->127.0.0.1:57000 (ESTABLISHED)
RAW_BUFFERClick to expand / collapse

Summary

When multiple Claude Code sessions run concurrently against the same VS Code instance, all sessions print "Opened changes in VS Code" after an edit, but only one session's diff actually opens — the one that won the WebSocket connection to the IDE extension. Other sessions print the message but nothing happens.

Repro

  1. Open VS Code with the Claude Code extension active.
  2. Start two or more claude sessions in separate terminals against the same workspace.
  3. From each session, propose an edit and accept it.
  4. Observe: all sessions display "Opened changes in VS Code", but the diff only appears for one of them.

Diagnosis from my environment

  • ~/.claude/ide/57000.lock exists with the workspace + auth token (single shared lock).
  • VS Code Helper listens on 127.0.0.1:57000 (single port).
  • lsof shows only one claude PID has an established connection to that port:
    Code Helper 57246  TCP 127.0.0.1:57000 (LISTEN)
    Code Helper 57246  TCP 127.0.0.1:57000->127.0.0.1:62653 (ESTABLISHED)
    claude      85242  TCP 127.0.0.1:62653->127.0.0.1:57000 (ESTABLISHED)
  • Other concurrent claude PIDs have zero connections to :57000, yet still print the "Opened changes in VS Code" message after edits.

Expected

Either:

  • The message only prints when the current process actually holds the IDE socket, or
  • The IDE extension supports concurrent client connections (preferred), or
  • The message indicates which session/window the diff was sent to.

Environment

  • claude-code 2.1.146 (also 2.1.144/2.1.145 present from older sessions)
  • macOS Darwin 25.5.0
  • VS Code with Claude Code extension
  • Terminal: cmux (pre-warms claude processes via --bg-spare/--bg-pty-host, which likely amplifies the multi-session count, but the root cause is independent of cmux)

Workaround

Close other claude sessions so only one remains, then VS Code routes correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix "Opened changes in VS Code" prints even when current process does not own the IDE websocket (multi-session scenarios)