--- description: "Load session context from saved state. Reads claude-state.json and claude-progress.md, shows what changed, suggests next action." --- # Load - Restore Session Context Load your session context from a previous save. Reads state files, shows what's changed since, and suggests the next action. ## Arguments $ARGUMENTS If no arguments, read from default `.claude/` location. ## What This Command Does 1. **Read State Files** - Load `.claude/claude-state.json` - Load `.claude/claude-progress.md` 2. **Analyze Changes Since Save** - Git commits since last save - File modifications - Time elapsed 3. **Restore TodoWrite State** - Populate TodoWrite with saved tasks - Preserve status (completed, in-progress, pending) 4. **Suggest Next Action** - Based on in-progress tasks - Highlight blockers or notes ## Execution Steps ### Step 1: Check for State Files ```bash ls -la .claude/claude-state.json .claude/claude-progress.md 2>/dev/null ``` If missing, report: ``` ⚠ No saved state found in .claude/ To create one, use: /save ``` ### Step 2: Read State Parse `.claude/claude-state.json`: - Extract timestamp - Extract task arrays - Extract context (branch, last commit, notes) ### Step 3: Calculate Time Since Save Compare save timestamp to current time: - Format as human-readable ("2 hours ago", "3 days ago") ### Step 4: Analyze Git Changes ```bash # Commits since save git log --oneline ..HEAD # Current status git status --short ``` ### Step 5: Restore TodoWrite Use TodoWrite tool to restore tasks: - Map `completed` → status: "completed" - Map `in_progress` → status: "in_progress" - Map `pending` → status: "pending" ### Step 6: Display Summary ```markdown # Session Loaded **Saved**: () **Branch**: ## Since Last Save - new commits - files modified -