Manage workflow state across sessions with handoff and resume. TOON-based state persistence.
AI-consumed reference. Optimized for Claude to read during execution. Human-readable explanation: see docs/architecture/HIERARCHICAL_PLANNING.md or docs/getting-started/ depending on topic.
Manage workflow state across sessions.
Token โฅ75% โ suggest handoff. User says handoff/save โ execute. User says resume + name/ID โ load.
.claude/handoffs/<name>.{json,md} โ <name> = slug of the session title: /rename custom title โ auto (ai) title โ session-<id8>. Two sessions in one project never overwrite each other; a same-title clash gets -<id8>.
handoff)node "${CLAUDE_PLUGIN_ROOT}/hooks/compact-handoff.cjs" --save --note "<done ยท next steps ยท decisions ยท blockers>". The session id comes from AF_CLAUDE_SESSION_ID (exported at SessionStart). The note is the part only you know โ make it specific..claude/plans/active.json, from the project root) and the project's own plan docs (ROADMAP.md, *_PLAN.md, docs/*plan*โฆ). If one of those is the living plan, update it there โ don't fork a second plan into the handoff./run: also keep run-state.json current (current_phase, next_action).
Non-code project (no .git, no manifest): do not create .claude/logs/runs/ or plan logs โ the handoff file is the only state./run resume <name> (or claude --resume "<title>")./run resume <name>)node "${CLAUDE_PLUGIN_ROOT}/hooks/compact-handoff.cjs" --show <name> (accepts name, title or session id; --list for all).hooks/compact-handoff.cjs saves the same per-session file automatically:
AF_HANDOFF_THRESHOLD (default 70%, read from the statusline's .claude/cache/context-usage.json); without statusline data, saves only while a run is open.compact/resume of the same session โ injects its handoff (auto snapshots are then deleted; manual ones stay). A new session only gets a list of named handoffs โ never another session's context. clear โ nothing.Handoffs older than 14 days are pruned. Disable: AF_COMPACT_HANDOFF_DISABLED=true.
workflow:
id: AUTH-1234
phase: 3
status: in_progress
agents[2]: architect,tester
Not found โ show available, suggest /run. Corrupted โ restore from .backup.json.
Completed: 30 days. Cancelled: 7 days. Paused: indefinitely.