[BUG] VSCode extension: session tab bar close button closes the OTHER tabs and keeps the current one
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In the VSCode extension, the Claude session tab bar (the strip listing the multiple Claude tabs I have open) has a close button on the tabs. Clicking it does not close the tab I clicked — it closes the other session tabs and leaves the active one open.
So the control behaves as "close all other tabs" while presenting itself as "close this tab".
Steps to Reproduce
- In VSCode, open several Claude sessions so the Claude tab bar shows multiple tabs.
- With one tab active, click the close (X) button in that tab bar.
- Observe: the other session tabs are closed and the active tab remains open. The expected result is that only the clicked tab closes.
Expected vs Actual
- Expected: the close button closes the one tab it belongs to, leaving all other session tabs open.
- Actual: the other session tabs are closed and the current one stays open.
Note: the behaviour itself is useful — it just needs its own affordance
"Close all other Claude sessions, keep the one I'm working in" is a genuinely useful action, especially after a session sprawl. Please don't just delete it — the ask here is:
- Make the tab close button close that tab.
- Keep the close-others behaviour as a separate, explicitly labelled action (context-menu item and/or a contributed command, e.g.
claude-vscode.closeOtherSessions), so it is discoverable and not triggered by accident.
Additional context from inspecting the shipped extension
Before filing I checked the installed extension for an intentional "close others" action and could not find one, which is part of why this looks like a mis-wired handler rather than a deliberate (if surprising) feature:
package.jsoninanthropic.claude-code-2.1.260-win32-x64contributes session-tab commandsclaude-vscode.renameSessionTab,claude-vscode.addSessionTabToGroup,claude-vscode.markSessionUnread, andclaude-vscode.reopenClosedSession— but no close, close-others, or close-all command.- Neither
extension.jsnorwebview/index.jscontains any "close other / close all / clear completed"-style UI string for sessions or tasks.
Because there is no labelled close-others action anywhere in the contributed commands, users have no way to know this is what the button will do.
Related
- #29631 —
Cmd+Wclosing two Claude tabs at once in the VSCode extension. Different symptom and likely a different cause (keybinding double-handling vs. the tab bar's own close handler), but both are session-tab close handling in the VSCode extension.
Environment
- Claude Code VSCode extension: 2.1.260 (win32-x64); 2.1.259 also present in
~/.vscode/extensions - VSCode: 1.136.1 (x64)
- OS: Windows 11 Home 10.0.26200