[FEATURE] Add `/list-sessions` and `/delete-session` slash commands for better session management

Resolved 💬 9 comments Opened Jan 8, 2026 by qsimeon Closed Mar 16, 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

Title: [FEATURE]

Description:

Currently, there's no convenient way to view or delete sessions without using claude --resume. This creates two UX problems:

  1. No way to list sessions without resuming - claude --resume forces an interactive selection interface. Users who just want to see their session history must navigate through the interactive menu.
  1. No way to delete sessions - There's no CLI command or slash command to delete a specific session by ID. While claude --resume clearly has access to the session file paths (since it can list them), there's no corresponding delete functionality.

Possible duplicate issue #13780

Proposed Solution

Add two slash commands that mirror standard session management workflows:

/list-sessions        # Lists all previous sessions with ID, timestamp, and initial prompt
/delete-session <id>  # Deletes a specific session by ID

Or alternatively, extend the CLI:

claude --list-sessions
claude --delete-session <session-id>

Why this matters:

  • Users want to audit their session history without being forced into resume mode
  • Session cleanup should be straightforward (currently requires manual directory navigation)
  • This would make Claude Code's session management more consistent with standard CLI tools
  • The session storage location is already known to the application

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

As a developer, I want to review my past sessions, identify ones I no longer need, and delete them without navigating ~/.claude/projects/ manually or using --resume in an unintended way.

Additional Context

_No response_

View original on GitHub ↗

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