Harness resume

From xwtro0tk1t-cloud/harness · View interactive version

Harness resume is an AI agent skill from the GitHub repository xwtro0tk1t-cloud/harness. Trigger when user says "harness resume", "resume context", "recover context", "load context", "resume after compact", "I want to continue where I left off", "restore work context". Lightweight same-session context recovery after /compact. Do NOT trigger for: "continue writing X function" (just code)

How to use this skill

Skill file

Harness Resume — Lightweight Context Recovery


description: Trigger when user says "harness resume", "resume context", "recover context", "load context", "resume after compact", "I want to continue where I left off", "restore work context". Lightweight same-session context recovery after /compact. Do NOT trigger for: "continue writing X function" (just code), "help me understand this file" (single file read), bare "resume" without context (too vague), "I'm new here" (use harness handoff instead).


Behavior

Perform lightweight context recovery for the current project. Core principle: Index-First, Fragment-on-Demand — only load indexes, read fragments on demand.

This is for same-session /compact recovery only. For new agent handoff or crash recovery, use harness handoff.


Steps

Step 1: task_plan.md Phase Anchor

Step 2: MEMORY.md Best-Match

Locate the project-specific MEMORY.md using this algorithm:

target = cwd.replace('/', '-').lstrip('-')
candidates = glob('~/.claude/projects/*/memory/MEMORY.md')
matches = [c for c in candidates if c.parents[1].name.lstrip('-') == target]

Step 3: docs/ INDEX Tree

Step 4: Output Structured Summary

📍 Current Phase: [Phase name / status]
⏳ Unfinished: [unchecked items]
⏸ Last stopped at: [latest progress entry]
🧠 Relevant memory: [MEMORY.md relevant entries]
📚 Doc index: [INDEX tree summary]

Next: Tell me what you want to do, I'll read specific doc fragments on demand

Token Budget

Target 3-5k tokens:

If exceeded, truncate Phase to ±15 lines first.


Empty Rendering

> No work context found — this may be a new project. Say harness to start initialization.

Graceful Degradation

Any file missing → skip that step, output "Step skipped (file not found)" and continue. Never error out.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.