[FEATURE] Add session deletion and file cleanup functionality
Resolved 💬 3 comments Opened Apr 1, 2026 by dukang1996 Closed May 26, 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
Currently, Claude Code has no way to delete conversations:
- VS Code extension: Deleting a conversation in the plugin UI does not remove the corresponding
.jsonlfiles in~/.claude/projects/<hash>/. The files keep accumulating and waste disk space.
- Terminal version: There is no command like
claude conversation delete <id>to delete conversations at all.
- No user-friendly session management: Session files are stored as UUIDs (e.g.,
3aec4d13-4203-4764-88e0-22857f54de7a.jsonl), making it impossible for users to identify which file corresponds to which conversation without manually parsing the JSON content.
Proposed Solution
Short term:
- When a user deletes a conversation in the plugin or terminal, automatically clean up the associated
.jsonlfiles and related directories at the same time. - Add a
claude conversations listcommand to show all sessions with human-readable info (e.g., first message preview, timestamp, size). - Add a
claude conversation delete <id>command for terminal users.
Long term (nice to have):
- Provide a session management UI in the VS Code extension showing conversation history with previews.
- Add ability to rename sessions to something meaningful.
Why this matters
- Disk space: Over months of regular use, the
~/.claude/projects/directory can grow to several GB with old session files that serve no purpose once a conversation is deleted. - User trust: Users expect that "deleting" something actually removes it, not just hides it from the UI.
- Usability: UUIDs are not human-readable, making manual cleanup impossible for users who want to reclaim disk space.
Environment
- Claude Code version: 2.1.78
- OS: Windows 11 (also applies to macOS/Linux)
- Installation type: VS Code extension + npm global installation
---
Thank you for considering this feature!
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗