claude-code - 💡(How to fix) Fix [VS Code] open?session= URI does not focus an already-open session - opens a fresh conversation (busy) or a duplicate view (idle)

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…
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code VS Code extension 2.1.163 (win32-x64), VS Code on Windows 11 Pro (build 26200)
  • Single VS Code window; the target session belongs to the currently open workspace

Docs say

Per https://code.claude.com/docs/en/vs-code (URI handler section):

session — A session ID to resume instead of starting a new conversation. … If the session isn't found, a fresh conversation starts instead. If the session is already open in a tab, that tab is focused.

Actual behavior (measured 2026-06-05)

Launching vscode://anthropic.claude-code/open?session=<id> where <id> is the hook-payload / transcript-filename session UUID:

Target session stateResult
Open in a tab, busy (tool running or permission prompt pending)A fresh empty conversation opens (the "not found" fallback)
Open in a tab, idleA duplicate view of the conversation opens at the default location, instead of focusing the existing tab
Closed (same workspace)Resumes correctly ✅

Verified via SessionStart/SessionEnd hook markers: each URI launch against an open session produced a new startup session id with no transcript (fresh-conversation fallback), and the duplicate/resume cases produced corresponding lifecycle events for the target id.

Expected

Focus the existing tab, as documented — including (especially) when the session is busy.

Use case / impact

Hook-driven OS toast notification → click → jump to the conversation that needs attention. A permission-pending session is exactly the one the user wants to jump to, and it is exactly the state that cannot be resolved. Related: #57230 (attention signals when running multiple sessions — currently only the small tab dot exists).

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