Deep link: allow opening a session in the Side Bar (/open?session=…&target=sidebar)

Status Open
Reported on v2.1.227
Maintainer reply None cached
Activity 1 comment · opened Aug 11, 2026

Summary

The vscode://anthropic.claude-code/open?session=<id> deep link always opens the
session in the primary editor. For anyone who keeps Claude Code in the Side Bar,
this opens the conversation in a different surface than the one they work in,
instead of switching the Side Bar to that conversation.

Please consider an optional target parameter.

Current behaviour

In extension.js (v2.1.227), the URI handler maps /open to a single command:

case "/open": {
  let session = params.get("session") ?? undefined,
      prompt  = params.get("prompt")  ?? undefined;
  vscode.commands.executeCommand("claude-vscode.primaryEditor.open", session, prompt);
  return;
}

The extension already contributes commands for the other surfaces:

  • claude-vscode.sidebar.open
  • claude-vscode.editor.open
  • claude-vscode.window.open

but the URI handler only accepts /open and /install-plugin, so those surfaces
cannot be reached from outside VS Code, and VS Code does not allow invoking
arbitrary commands from an external process.

Proposal

Accept an optional target on /open:

vscode://anthropic.claude-code/open?session=<id>&target=sidebar
vscode://anthropic.claude-code/open?session=<id>&target=editor
vscode://anthropic.claude-code/open?session=<id>&target=window

mapping to the existing commands, defaulting to today's primaryEditor.open when
target is absent, so nothing changes for current callers.

Why this is useful

External tooling can already bring the right VS Code window forward and hand it a
session id. What's missing is landing in the surface the user actually uses. In our
case a small tray app watches sessions across machines and shows a notification when
one finishes or asks a question; clicking it should take the user straight to that
conversation. Today it opens a second copy in the primary editor while the Side Bar —
where the user is looking — stays on whatever it had.

A target parameter would also help anything else that deep-links into a
conversation: task runners, dashboards, scripts, or a phone-side companion.

Environment

  • Extension: anthropic.claude-code 2.1.227, win32-x64
  • VS Code on Windows 11

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗