List all development sessions by:
- Check if
.claude/sessions/directory exists - List all
.mdfiles (excluding hidden files and.current-session) - For each session file:
- Show the filename
- Extract and show the session title
- Show the date/time
- Show first few lines of the overview if available
- If
.claude/sessions/.current-sessionexists, highlight which session is currently active - Sort by most recent first
Present in a clean, readable format.
Token Optimization
Expected range: 100–400 tokens (initial), 50 tokens (cache hit)
Caching: Caches session index in .claude/sessions/.session-index.json for 7 days.
Early exit: Returns immediately if the session index is empty.
Patterns used: Grep-before-Read, early exit, caching