[FEATURE] Add ability to delete/manage past sessions
Resolved 💬 2 comments Opened Apr 8, 2026 by vivekaltruist Closed May 22, 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 there's no built-in way to delete or manage past Claude Code sessions. Users can only start new sessions or clear the current conversation context with /clear, but old sessions persist indefinitely in ~/.claude/projects/.
Proposed Solution
- A /sessions list command to view past sessions (date, summary, size)
- A /sessions delete <id> command to delete a specific session
- A /sessions prune --older-than 30d command to bulk-delete old sessions
Alternative Solutions
- Manually deleting files from ~/.claude/projects/ — works but is fragile, undocumented, and risks breaking state if the internal format changes
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
- Free up disk space by removing old, irrelevant sessions
- Remove sessions that contain sensitive information (credentials accidentally pasted, internal URLs, etc.)
- General housekeeping — after weeks of use, sessions accumulate with no way to prune them
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗