-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Preflight Checklist
- I have searched existing requests and this feature hasn't been requested yet
- This is a single feature request (not multiple features)
Problem Statement
I often use Claude Code for long-running development tasks and debugging workflows where I create multiple independent coding sessions over time.
Currently there is no way to delete a specific historical session from the CLI or VS Code plugin — the only option is to clear the entire current session.
This results in large amounts of irrelevant session history accumulating, forcing me to manually scroll through many prompts and responses, wasting tokens and time.
Similarly, in the VS Code extension there is no ability to rename or remove specific sessions, so I can’t label them with meaningful names or clean up old, unneeded sessions.
This makes session management cumbersome, increases cognitive load, and also leads to unnecessary token usage and cost because irrelevant context is preserved.
A native way to delete a session and to rename sessions in the plugin would greatly improve usability, especially for workflows that involve switching between multiple tasks or long term projects where context management is critical.
Proposed Solution
To improve session management in Claude Code, I propose the following enhancements to both the CLI and the VS Code extension:
-
CLI Enhancements
- Add a dedicated subcommand for session deletion, e.g.:
This should permanently remove the specified session and its associated history files.
claude session delete <session-id> - Add a listing subcommand that shows session IDs, timestamps, and optionally custom names:
claude session list
- Add a dedicated subcommand for session deletion, e.g.:
-
CLI & Interactive TUI Support for Naming
- Support a session naming slash command in the interactive REPL:
This would assign a custom human-readable label to the current session, improving clarity in session selection and history navigation.
/rename <new-name> - Allow resuming by name as well as ID:
claude --resume <session-name>
- Support a session naming slash command in the interactive REPL:
-
VS Code Extension Improvements
- In the session selector or session history UI, provide UI controls for:
- Renaming a session
- Deleting a session
- The extension should display custom session names (if set), and offer buttons/menus to perform these actions without resorting to the CLI.
- In the session selector or session history UI, provide UI controls for:
These changes would offer a more intuitive workflow for managing multiple sessions, avoid manual file cleanup (~/.claude/projects/...), and make it easier to switch between tasks in both terminal and IDE contexts.
Alternative Solutions
No response
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
No response
Additional Context
No response