| name | resume |
| description | Resume from previous session handoff. Reads .claude/handoff.md (the latest-alias), validates branch matches, checks for commits since handoff, compares pipeline phase, reports any state drift. Presents remaining work priority-ordered and recommends the single best first action. Marks the handoff consumed without destroying history — the permanent copies + ledger in .claude/handoffs/ are never truncated (migrates an older single-file handoff into that history). Use at session start. |
| disable-model-invocation | true |
Restore context from `.claude/handoff.md` so work continues without information loss. Validate nothing drifted since handoff was written.
Handoff content
!cat .claude/handoff.md 2>/dev/null || echo "ERROR: No handoff found at .claude/handoff.md"
Current state
- Branch: !
git branch --show-current 2>/dev/null
- Recent commits (last 5):
git log --oneline -5 2>/dev/null
git diff --stat 2>/dev/null || echo "clean"
1. Validate handoff exists
If handoff content shows "ERROR: No handoff found", inform user and stop. Suggest running /handoff in their previous session next time, or ask what they were working on to manually restore context.
2. Validate state consistency
Compare handoff expectations against current state:
- Branch match: Is current branch same as handoff's
branch frontmatter? If not, report discrepancy.
- New commits: Are there commits after the handoff timestamp not mentioned in handoff? If so, summarize what changed.
- Pipeline state: If handoff lists a pipeline phase, check
.pipeline/state.yaml — has phase advanced or regressed?
- Branch State drift: Compare handoff's
## Branch State against current reality — especially the tests-passing flag (handoff said passing but uncommitted changes landed since? flag it) and the uncommitted-changes claim vs the git diff above.
Report all discrepancies clearly before proceeding.
3. Present context
Summarize for the user in this format:
## Session Resume
**Last session:** <timestamp from handoff>
**Branch:** <branch> <match/mismatch indicator>
### Completed previously
<from handoff "What Was Done">
### Remaining work (priority order)
<from handoff "What Remains">
### Critical context to keep in mind
<from handoff "Critical Context">
### Blockers
<from handoff "Blockers">
### Notes from last session
<from handoff "Notes", surfaced verbatim — user-provided context; "None" if empty>
### State discrepancies since handoff
<any drift found in step 2 — including Branch State / tests-passing drift — or "None — state matches handoff">
4. Suggest first action
Based on remaining work priority + blockers + pipeline state:
- Recommend the single most impactful next action.
- If a pipeline exists, suggest running
/next (essense-flow) for the recommended command and factor that in.
- If blockers exist, suggest addressing the blocker first.
5. Mark the handoff consumed (history is preserved — never deleted)
/handoff now keeps the permanent copy in .claude/handoffs/handoff-<ts>.md and the ledger in .claude/handoffs/INDEX.md, so the full history already survives independently of .claude/handoff.md. After presenting:
- If
.claude/handoffs/INDEX.md exists (handoff written by the current format): the permanent copy is already on disk — just delete .claude/handoff.md (the latest-alias) so it isn't re-consumed next session. Do NOT touch .claude/handoffs/ — that history is never truncated.
- Backward-compat — if
.claude/handoffs/ does NOT exist (a handoff written by an older version): preserve it by renaming .claude/handoff.md to .claude/handoffs/handoff-<YYYY-MM-DDTHH-mm-ssZ>.md (full timestamp from frontmatter, colons → -) and seed .claude/handoffs/INDEX.md with its entry — migrating the old single-file handoff into the history rather than discarding it.
Never delete entries from .claude/handoffs/ — the ledger is the durable session track record.