Resume an interrupted AI coding session after token exhaustion, rate limiting, or process restart. Use when a session was interrupted mid-task.
Install
npx skillscat add strikersam/autonomous-ai-agency/claude-skills-cooldown-resume Install via the SkillsCat registry.
Skill: cooldown-resume
When to Use
Use this skill immediately after:
- A coding session was interrupted by token exhaustion
- Rate limiting or quota exhaustion stopped a task
- A process restart wiped in-memory state
- You are starting a new session and need to continue previous work
Instructions
Step 1 — Read the checkpoint files
# Human-readable next action
cat .claude/state/NEXT_ACTION.md
# Machine-readable full state
cat .claude/state/agent-state.json
# Ordered log of completed steps
cat .claude/state/checkpoint.jsonlOr use the AI runner:
python scripts/ai_runner.py statusStep 2 — Assess the state
From agent-state.json, determine:
completed_steps— what is already done (do NOT redo these)next_step— what to do nextchanged_files— what files were modified (check their current state)pending_risks— any known issues or blockers
Step 3 — Verify changed files are correct
For each file in changed_files, read the current content to confirm
the change was fully applied (not half-written due to interruption).
If a file appears partially written:
- Read the file fully.
- Compare with what the step description says it should contain.
- Complete or revert the partial change before continuing.
Step 4 — Run tests to confirm baseline
pytest -xIf tests fail after resuming:
- Read the test error carefully.
- Check if it is related to a partial change from the interrupted session.
- Fix the partial change, then re-run tests.
Step 5 — Continue from next_step
Execute only the steps that are NOT in completed_steps.
After each sub-step completes, append to .claude/state/checkpoint.jsonl:
{"ts":"<ISO8601>","step":"<step-id>","status":"done","detail":"<what was done>"}And update .claude/state/agent-state.json:
- Move the step from plan to
completed_steps - Update
next_stepto the following step - Update
last_updated
Step 6 — Use the watchdog for future sessions
For long tasks, start with the AI runner watchdog to get automatic resume:
python scripts/ai_runner.py start --session my-task "instruction here"The watchdog monitors for interruptions and resumes automatically.
See docs/runbooks/auto-resume.md for full documentation.
Idempotency Rules
- Never re-apply a step that is already in
completed_steps. - If a file already has the expected content, skip the write — do not overwrite.
- Use
git diffto confirm a change was actually needed before applying.
Acceptance Checks
-
agent-state.jsonwas read and current state understood -
checkpoint.jsonlreviewed to confirm which steps are truly done - No completed step was repeated
- Tests pass after resuming
-
agent-state.jsonupdated with resumed progress -
NEXT_ACTION.mdupdated to reflect current next step