"Add 'Delete Session' to session list context menu"

Resolved 💬 3 comments Opened Feb 24, 2026 by Godstar2026 Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

n the VS Code extension sidebar, right-clicking a session in the session list opens the default Electron context menu (Cut / Copy / Paste / Select All). These options operate on text selection, not on the session item itself — there is no way to delete, rename, or manage individual sessions from the UI.

Over time, the session list accumulates stale or one-off conversations that clutter navigation. The only current way to remove a session is via the CLI (claude sessions delete), which requires switching context out of VS Code entirely.

Expected behavior:

Right-clicking a session in the sidebar should open a custom context menu with at least:

Delete Session — removes the session after a confirmation prompt
(Optional) Rename Session — edits the auto-generated session title

Proposed Solution

Replace the default Electron context menu on session list items with a custom context menu that includes session-specific actions.

Minimum viable implementation
Register a custom context menu on session list items in the TreeView/sidebar, suppressing the default Electron Cut/Copy/Paste menu.

Add a "Delete Session" menu item that:

Prompts for confirmation ("Delete session '{title}'? This cannot be undone.")
Calls the same underlying deletion logic as claude sessions delete <id> in the CLI
Refreshes the session list after successful deletion
Nice-to-have additions
"Rename Session" — allows the user to edit the session title inline or via an input box.
"Copy Session ID" — copies the session ID to clipboard (useful for CLI workflows or bug reports).
Implementation notes
VS Code's TreeView API supports menus contributions via package.json under contributes.menus → "view/item/context", so this follows standard extension patterns.
The confirmation dialog should use vscode.window.showWarningMessage with explicit "Delete" / "Cancel" buttons to prevent accidental data loss.
The destructive action ("Delete Session") should appear last or be visually separated, consistent with VS Code UX conventions.
References
VS Code TreeView context menu API: contributes.menus → view/item/context
Existing CLI precedent: claude sessions list, claude sessions delete

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Developer tools/SDK

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗