AgileFlow

/session:history

PreviousNext

View past session history and usage metrics

/session:history

Display history of all sessions, including ended ones, with timing and activity metrics.

Quick Start

/agileflow:session:history

Parameters

ParameterRequiredDefaultDescription
DAYSNo7Number of days of history to show

Examples

# Last 7 days (default)
/agileflow:session:history
 
# Last 30 days
/agileflow:session:history DAYS=30
 
# All history
/agileflow:session:history DAYS=all

Example Output

Session History (last 7 days)
─────────────────────────────────────────────────────────────────

Session 1 (main)
  Path: /home/user/myproject
  Branch: main
  Status: active
  Created: 2025-12-20 10:00
  Duration: 6d 5h (ongoing)

Session 2 "auth"
  Path: /home/user/myproject-auth
  Branch: session-2
  Status: ended
  Created: 2025-12-24 14:00
  Ended: 2025-12-25 16:30
  Duration: 1d 2h 30m
  Worktree: removed

Session 3
  Path: /home/user/myproject-3
  Branch: session-3
  Status: ended
  Created: 2025-12-26 09:00
  Ended: 2025-12-26 12:00
  Duration: 3h
  Worktree: kept at /home/user/myproject-3

─────────────────────────────────────────────────────────────────
Total sessions: 3
Active: 1    Ended: 2
Average duration: 2d 3h

History Data

The session history includes:

FieldDescription
Session IDNumeric identifier
NicknameHuman-friendly name if provided
PathDirectory location
BranchGit branch used
Statusactive, ended, or stale
CreatedWhen session was started
EndedWhen session was ended (if applicable)
DurationHow long the session was active
WorktreeWhether worktree was kept or removed

Use Cases

Reviewing Work Patterns

/agileflow:session:history DAYS=30
# See how many sessions you've used
# Identify if you're creating too many abandoned sessions

Finding Old Sessions

/agileflow:session:history DAYS=all
# Find a session from weeks ago
# Check if its worktree still exists

Cleanup Decisions

/agileflow:session:history
# See which sessions have worktrees kept
# Decide which to clean up

Data Storage

Session history is stored in .agileflow/sessions/registry.json:

{
  "sessions": {
    "1": {
      "created": "2025-12-20T10:00:00Z",
      "last_active": "2025-12-26T15:00:00Z",
      "is_main": true
    },
    "2": {
      "created": "2025-12-24T14:00:00Z",
      "ended": "2025-12-25T16:30:00Z",
      "nickname": "auth",
      "worktree_removed": true
    }
  }
}