[FEATURE] Add /clear-sessions command to clean up /resume list

Open 💬 2 comments Opened Jun 30, 2026 by sheengoa

Problem

Currently there is no built-in way to clean up the /resume session list. Over time, the list accumulates hundreds of stale entries from old/dead sessions.

The only workaround is manually deleting files from:

  • ~/.claude/session-env/<uuid>/
  • ~/.claude/projects/<project-dir>/<session-id>*

This is tedious and error-prone — users should not have to know the internal storage layout.

Feature Request

A /clear-sessions slash command (or claude sessions clean CLI subcommand) that:

  1. Lists sessions grouped by project with their age
  2. Allows selective deletion (e.g. /clear-sessions --older-than 7d, /clear-sessions --project <path>)
  3. Preserves the current active session

Use Cases

  • Clean up hundreds of stale /resume entries accumulated over months
  • Remove sessions for projects that no longer exist
  • Free up disk space from old session transcripts

Existing Related Issues

  • #26904 — /delete to delete current session (related but different scope)
  • #65615 — Archive/delete conversation feature

View original on GitHub ↗

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