| name | harness:resume |
| description | Load and present the most recent plan state for agent context handoff. Reads .claude/plan-progress.md (primary) or .plan_progress.jsonl (fallback) and formats the structured plan state — task, status, accomplished work, in-progress items, next steps, and search hints — so a new agent session can orient itself immediately. Search hints are presented as actionable pointers (file paths, grep patterns, key symbols) that the resuming agent verifies with its own Read/Grep/Glob tools. Use when: (1) starting a new session that continues previous agent work, (2) quickly checking what the current plan state is, (3) injecting saved plan state into an agent system prompt via the SDK, (4) bridging sessions after a context window limit or session restart, (5) presenting a handoff summary before a new agent begins. Triggers on: harness resume, load plan state, what was I working on, resume previous session, show plan progress, continue from last session, where did I leave off, read handoff, present context handoff. |
harness:resume
Overview
harness:resume reads the most-recent saved plan state and presents it as a
structured context block so a new agent session can pick up exactly where the
previous one left off.
It is the reading complement to the context-handoff skill's write side:
where context-handoff tells an ending agent how to write a handoff,
harness:resume gives a starting agent the tools to consume it.
Two sources are supported:
| Source | Path | Notes |
|---|
| Markdown | .claude/plan-progress.md | Primary; latest-wins (overwritten each session) |
| JSONL | .plan_progress.jsonl | Fallback; append-only audit trail |
Workflow
Do you want to read and display the current plan state?
→ CLI usage
Do you want to inject plan state into an agent session at startup?
→ SDK integration
Do you want to verify search hints right now?
→ Rebuilding context from hints
CLI Usage
python -m harness_skills.resume
python -m harness_skills.resume --hints
python -m harness_skills.resume --json
python -m harness_skills.resume --md-path .claude/other-progress.md
python -m harness_skills.resume --prefer jsonl
The helper script scripts/resume.py wraps the CLI for
use without installing the full package.
SDK Integration
Use resume_agent_options to inject plan state into a new agent session's
system prompt before the first turn:
from harness_skills.resume import load_plan_state, resume_agent_options
from claude_agent_sdk import ClaudeAgentOptions, query
state = load_plan_state()
options, state = resume_agent_options(
ClaudeAgentOptions(allowed_tools=["Read", "Glob", "Grep"]),
state=state,
)
async for msg in query(prompt="Continue from where we left off.", options=options):
print(msg)
Or load state yourself and pass it in:
from pathlib import Path
from harness_skills.resume import load_plan_state, resume_agent_options
state = load_plan_state(
md_path=Path(".claude/plan-progress.md"),
jsonl_path=Path(".plan_progress.jsonl"),
prefer="md",
)
if not state.found():
print("No saved plan state — starting fresh.")
else:
options, _ = resume_agent_options(base_options, state=state)
Rebuilding Context from Hints
After loading the plan state, a resuming agent should verify the hints
rather than trusting them as ground truth:
from harness_skills.resume import load_plan_state
state = load_plan_state()
hints = state.search_hints
for path in hints.file_paths:
for pattern in hints.grep_patterns:
for directory in hints.directories:
for symbol in hints.symbols:
Programmatic API
load_plan_state
from harness_skills.resume import load_plan_state, PlanState
state: PlanState = load_plan_state(
md_path=Path(".claude/plan-progress.md"),
jsonl_path=Path(".plan_progress.jsonl"),
prefer="md",
)
state.found()
state.task
state.status
state.timestamp
state.accomplished
state.in_progress
state.next_steps
state.search_hints
state.open_questions
state.artifacts
state.notes
state.source
format_resume_context
from harness_skills.resume import load_plan_state, format_resume_context
state = load_plan_state()
print(format_resume_context(state))
format_hints_only
from harness_skills.resume import load_plan_state, format_hints_only
state = load_plan_state()
print(format_hints_only(state))
build_resume_prompt
from harness_skills.resume import load_plan_state, build_resume_prompt
state = load_plan_state()
prompt = build_resume_prompt(state)
PlanState Fields
| Field | Type | Description |
|---|
task | str | High-level task description. |
status | str | "in_progress" | "blocked" | "done". |
session_id | str | Session that wrote the last handoff. |
timestamp | str | ISO-8601 UTC timestamp of the last save. |
accomplished | list[str] | Items completed in the previous session. |
in_progress | list[str] | Partially-done work with % complete notes. |
next_steps | list[str] | Ordered actions for the resuming agent. |
search_hints | SearchHints | File paths, directories, grep patterns, symbols. |
open_questions | list[str] | Unresolved decisions or blockers. |
artifacts | list[str] | Files created or significantly modified. |
notes | str | Free-form context. |
source | str | "markdown" | "jsonl" | "none". |
SearchHints Fields
| Field | Type | Description |
|---|
file_paths | list[str] | Relative paths to read first. |
directories | list[str] | Directories to explore with Glob. |
grep_patterns | list[str] | Regex patterns for the Grep tool. |
symbols | list[str] | Class/function/variable names to search for. |
Key Files
| Path | Purpose |
|---|
harness_skills/resume.py | All public API — load_plan_state, PlanState, SearchHints, format_resume_context, format_hints_only, build_resume_prompt, resume_agent_options, CLI. |
skills/harness-resume/scripts/resume.py | Standalone CLI helper (no package install needed). |
.claude/plan-progress.md | Primary plan state source (written by context-handoff skill). |
.plan_progress.jsonl | Append-only audit trail fallback source. |
harness_skills/handoff.py | HandoffDocument / HandoffProtocol — used internally for Markdown parsing. |