claude-sessions-cli

๐Ÿงน Clean Mode

Interactively remove ghost entries, history-less projects, and orphaned history folders.

Over time, ~/.claude.json and ~/.claude/projects/ accumulate stale data โ€” entries for deleted directories, projects with no conversation history, and orphaned history folders. Clean mode finds these and lets you remove them safely.

๐Ÿš€ Launching

Clean mode is available two ways:

  • Press C inside the TUI session browser.

  • Run the standalone subcommand:

    claude-sessions clean

Both scan ~/.claude.json and ~/.claude/projects/, group the issues found by type, and let you select which categories to remove. Nothing is deleted without an explicit y confirmation.

๐Ÿ” What it finds

TypeMeaningAction
ghostIn ~/.claude.json but the project directory no longer existsRemove from ~/.claude.json
no historyIn ~/.claude.json with no conversation historyRemove from ~/.claude.json
orphaned historyHistory in ~/.claude/projects/ with no matching ~/.claude.json entryTrash the history folder

Orphaned history folders are moved to the trash rather than permanently deleted, so they can be recovered if needed.

On this page