cooldown-resume
Skill12 starsChanged 29 days agoMITView on GitHub
Resume an interrupted AI coding session after token exhaustion, rate limiting, or process restart. Use when a session was interrupted mid-task.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/verification.mdcCursor rule
- agentic-agileSkill
- agentic-portfolioSkill
- client-onboardingSkill
- drillSkill
- ecc-harness-patternsSkill
- fabric-patternsSkill
- graphiti-temporalSkill
- managed-agents-dreamsSkill
- model-catalogue-updateSkill
- platform-setupSkill
- repowise-intelligenceSkill
- risky-module-reviewSkill
- seo-audit-reportSkill
- user-researchSkill
- video-contextSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use this skill immediately after:
- Distinctive: line 65
If a file appears partially written:
- Distinctive: line 66
Read the file fully.
- Distinctive: line 76
If tests fail after resuming:
- Distinctive: line 77
Read the test error carefully.
- Distinctive: line 78
Check if it is related to a partial change from the interrupted session.
- Very specific: line 84
After each sub-step completes, append to .claude/state/checkpoint.jsonl:
- Very specific: line 92
Update next_step to the following step
- Very specific: line 108
Never re-apply a step that is already in completed_steps.
- Distinctive: line 109
If a file already has the expected content, skip the write — do not overwrite.
- Distinctive: line 110
Use git diff to confirm a change was actually needed before applying.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 understoodcheckpoint.jsonlreviewed to confirm which steps are truly done- No completed step was repeated
- Tests pass after resuming
agent-state.jsonupdated with resumed progressNEXT_ACTION.mdupdated to reflect current next step
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

