[BUG] Cmd+N broadcasts new-conversation to all open Claude tabs (allComms fan-out) — reopens #31455
Summary
In the VS Code extension, pressing Cmd+N (the "new conversation" shortcut) opens a new conversation in every open Claude Code tab at once, instead of one new conversation in the focused tab. With 3 agent tabs open, a single Cmd+N spawns 3 new conversation tabs.
This is the same defect as #31455 (closed as not planned/stale). That report only speculated at the cause; this one includes the confirmed root cause from the shipped bundle, so please treat it as a re-open with evidence rather than a fresh triage.
Environment
- Claude Code VS Code extension: 2.1.210 (
anthropic.claude-code-2.1.210-darwin-arm64) - VS Code: 1.128.1
- macOS 26.5.2, arm64 (Apple Silicon)
- Using the VS Code extension, not the terminal CLI.
claudeCode.enableNewConversationShortcut: true,claudeCode.preferredLocation: "panel"
Steps to reproduce
- Open 3 Claude Code conversation tabs (e.g. 3 agents on 3 workloads).
- Focus any one Claude tab.
- Press Cmd+N once.
Expected: one new conversation opens (in the focused tab / one new tab).
Actual: 3 new conversation tabs open — one per already-open tab. The count of new tabs equals the number of live Claude webview connections.
Root cause (confirmed from extension.js, 2.1.210)
The claude-vscode.newConversation command calls the manager's notifyCreateNewConversation(), which broadcasts to every connection in this.allComms rather than targeting the active panel:
// command handler — fires once per keypress (correct)
registerCommand("claude-vscode.newConversation", async () => { u.notifyCreateNewConversation() })
// manager — fans the single call out to ALL open Claude webviews
notifyCreateNewConversation() {
for (let e of this.allComms) e.notifyCreateNewConversation()
}
// per-connection — each one requests a brand-new conversation
notifyCreateNewConversation() {
this.send({ type: "request", channelId: "", requestId: "", request: { type: "create_new_conversation" } })
}
So the keybinding is firing exactly once; the extension multiplies it across allComms. The number of spurious tabs scales with the number of open Claude panels, which matches the reproduction and the observation in #31455 ("number matches the count of visible tabs").
Suggested fix
claude-vscode.newConversation should target a single connection — the active/focused webview panel — rather than iterating over this.allComms. Route the create_new_conversation request only to the panel that currently has focus (e.g. the one matching activeWebviewPanelId == 'claudeVSCodePanel', which the keybinding's when clause already uses).
Impact / current workaround
For users who intentionally run multiple Claude tabs (parallel agents), there is no good workaround: the only way to stop the fan-out is to disable the shortcut entirely (claudeCode.enableNewConversationShortcut: false) or keep just one tab open — both defeat the multi-agent workflow the extension otherwise supports well.