anthropics / anthropics/claude-code
[BUG] VSCode extension: session tab bar close button closes the OTHER tabs and keeps the current one
- Lenguaje dominante
- Python
- Estrellas
- 145k
- Forks
- 23.1k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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
1. In VSCode, open several Claude sessions so the Claude tab bar shows multiple tabs.
2. With one tab active, click the close (X) button in that tab bar.
3. 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:
1. Make the tab close button close *that* tab.
2. 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.json` in `anthropic.claude-code-2.1.260-win32-x64` contributes session-tab commands `claude-vscode.renameSessionTab`, `claude-vscode.addSessionTabToGroup`, `claude-vscode.markSessionUnread`, and `claude-vscode.reopenClosedSession` — but no close, close-others, or close-all command.
- Neither `extension.js` nor `webview/index.js` contains 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+W` closing 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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start by reproducing the tab-bar close behavior in the VSCode extension with multiple Claude sessions. Inspect the shipped extension entry points named in the issue: package.json, extension.js, and webview/index.js, focusing on session tab close handlers and contributed commands. Done means the clicked tab closes, other tabs remain open, and the close-others behavior is exposed as a separate labelled command or menu action.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, vscode
- Área
- desktop, developer-experience
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 70/100