/session:cleanup
Interactively clean up finished sessions with AI-powered assessment of each session's importance and merge eligibility.
Quick Start
/agileflow:session:cleanupHow It Works
- Shows a detailed health report for all sessions
- Walks through each session with issues one-by-one
- AI assesses each session: SAFE TO DELETE vs IMPORTANT - KEEP
- Checks merge eligibility for sessions with branches
- Presents options based on assessment and merge status
Assessment Options
| Scenario | Options Available |
|---|---|
| Safe + Mergeable | Delete, Merge and delete, Keep |
| Important + Mergeable | Merge and delete, Keep, Switch to session |
| Cannot merge (uncommitted changes) | Keep, Switch to fix, Delete anyway |
| Safe + No merge needed | Delete, Keep |
| Has conflicts | Keep, Switch to resolve, Delete anyway |
Session Tracking
After cleanup, displays:
- Sessions deleted
- Sessions merged
- Sessions kept
- Orphaned registry entries cleaned
Related Commands
| Command | Purpose |
|---|---|
/session:status | View session health before cleanup |
/session:spawn | Spawn new sessions |
/session:end | End the current session |