Resume autonomous execution from checkpoint after session interrupt or token limit
Resumes autonomous development session from last checkpoint after interruption.
/plugin marketplace add adiomas/claude-code-adiomas-plugins/plugin install autonomous-dev@adiomas-pluginsResume an interrupted autonomous development session from the last checkpoint.
/auto-status shows incomplete session# Check for existing state machine
if [[ -f ".claude/auto-state-machine.yaml" ]]; then
echo "Previous session found"
RESUME_MODE=true
else
echo "No previous session to resume"
exit 0
fi
Read the state machine to understand where we left off:
Read .claude/auto-memory/ files to reconstruct context:
CRITICAL: Do NOT re-run completed phases. Trust the checkpoints.
Based on current_state in state machine:
| Current State | Resume Action |
|---|---|
| DETECT | Re-run detection (rare - usually complete) |
| CLASSIFY | Read auto-context.yaml, continue to PLAN |
| PLAN | Read existing plan, get user approval, continue to EXECUTE |
| EXECUTE | Check auto-progress.yaml for pending tasks, continue execution |
| INTEGRATE | Continue merging branches |
| REVIEW | Run fresh verification |
| RESEARCH | Continue from current research phase |
For EXECUTE phase resume:
# Read .claude/auto-progress.yaml to find:
tasks:
task-1:
status: done # ← Skip
task-2:
status: done # ← Skip
task-3:
status: in_progress # ← RESUME HERE
branch: auto/task-3
iterations: 2
task-4:
status: pending # ← Do after task-3
/tmp/auto-worktrees/task-{id}/Before continuing, validate:
# Verify plan file exists
ls .claude/plans/auto-*.md
# Verify project profile exists
ls .claude/project-profile.yaml
# Verify auto-context exists
ls .claude/auto-context.yaml
If any are missing, notify user and ask how to proceed.
On successful resume:
=== RESUME SESSION ===
Session ID: auto-20240115-103000
Resuming from: EXECUTE phase
Work Type: FRONTEND
Completed: DETECT, CLASSIFY, PLAN
Pending Tasks:
- task-3: Create Auth API (in_progress, iteration 2)
- task-4: Add Tests (pending)
Mandatory Skills for EXECUTE:
- superpowers:test-driven-development
- frontend-design
Continuing execution...
=== END RESUME ===
No previous autonomous session found.
Use /auto to start a new session.
State machine file is corrupted or incomplete.
Options:
1. Delete .claude/auto-state-machine.yaml and start fresh with /auto
2. Manually fix the state file
3. Check .claude/auto-memory/ for recoverable context
Plan file not found at .claude/plans/auto-*.md
Cannot resume EXECUTE phase without plan.
Options:
1. Re-run /auto-plan to create new plan
2. Check if plan was moved to docs/plans/
This command:
.claude/auto-state-machine.yaml for current state.claude/auto-memory/*.md for contextUser: The session was interrupted. Let me continue.
> /auto-continue
Claude: Resuming autonomous session...
Session ID: auto-20240115-103000
Current State: EXECUTE
Work Type: FRONTEND
Reading context from checkpoints...
- Phase 1 (DETECT): Complete - Next.js project detected
- Phase 2 (CLASSIFY): Complete - FRONTEND with DESIGN_QUALITY focus
- Phase 3 (PLAN): Complete - 5 tasks planned
Pending tasks:
- task-3: Create UserProfile component (in_progress)
- task-4: Add unit tests (pending)
- task-5: Integration tests (pending)
Invoking mandatory skills for EXECUTE phase:
- superpowers:test-driven-development
- frontend-design
Continuing with task-3...