Feature request: Add CLI commands for listing and deleting sessions

Resolved 💬 3 comments Opened Apr 12, 2026 by cutemiex Closed Apr 15, 2026

Problem

Currently there's no built-in CLI command to list or delete past sessions. claude --resume / claude -r opens an interactive picker to resume sessions, but there's no way to:

  • List sessions non-interactively (e.g., for scripting)
  • Delete specific sessions
  • Clean up old sessions

Users must manually find and remove .jsonl files from ~/.claude/projects/<project>/, which requires knowing the internal storage path and structure.

Proposed Solution

Add session management subcommands, for example:

claude sessions list                # List past sessions (with dates, project, summary)
claude sessions delete <session-id> # Delete a specific session
claude sessions clear               # Delete all sessions (with confirmation)

Why

Session files accumulate over time and there's no ergonomic way to manage them. This would complement the existing --resume and --continue flags with full lifecycle management.

View original on GitHub ↗

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