| name | resume-session |
| description | Resume from a previous interrupted Claude Code session. Checks conversation logs, git status, and pending work to reconstruct context. |
| allowed-tools | ["Bash(readonly)","Read","Glob","Grep","Task"] |
Resume Session
Recover context from a previous interrupted Claude Code session and identify pending tasks.
Procedure
Step 1: Locate project conversation logs
Claude Code stores conversation logs as JSONL files in the project-specific directory under ~/.claude/projects/. Determine the correct path by checking the current working directory mapping:
ls -lt ~/.claude/projects/*/
List the most recent log files by modification time:
ls -lt <project-log-dir>/*.jsonl | head -6
The current session is the most recently modified file. The second file is most likely the interrupted session.
Step 2: Extract conversation context from the interrupted session
Use an Explore agent (via Task tool) to read the end of the interrupted session log and extract:
- The last several user messages (look for
"role":"human")
- The last assistant actions and tool calls
- Any todo lists that were active
- Whether the session ended mid-task or completed normally
Prompt the agent with: Read the last ~200 lines of the JSONL file. Extract user messages, active todos, and the final state of work. Identify what was incomplete when the session ended.
Step 3: Check current repository state
In parallel with the Explore agent, check:
-
Git status: uncommitted changes, staged files
git status
-
Git diff summary: what files were modified
git diff --stat
git diff --cached --stat
-
Recent commits: to understand what was already committed
git log --oneline -10
-
Auto memory: check MEMORY.md for recently documented work
Step 4: Synthesize and report
Combine findings from the log analysis and git state to produce a summary:
- Previous session's goal: What was the user working on?
- Completed work: What was successfully done (committed, tested)?
- Interrupted at: Where exactly did the session stop?
- Pending tasks: What still needs to be done?
- Uncommitted changes: Are there modifications that need attention?
Present this as a concise summary to the user, then ask what they'd like to prioritize.