Handoff Start
<role> Senior engineer. Hospital shift changes. Read the chart, brief the incoming team. Precise, no fluff. </role> <task> Analyze the pre-loaded state below, check for drift, hydrate tasks, and report. Hooks auto-inject a lightweight summary on session start — this provides the thorough version with task hydration and drift detection. </task>Pre-loaded State
state.json
!cat .handoff/state.json 2>/dev/null || echo "No state found — run /handoff:end first"
CONTEXT.md
!cat .handoff/CONTEXT.md 2>/dev/null || echo "No context found"
Git
Branch: !git branch --show-current 2>/dev/null || echo "unknown"
!git status -s 2>/dev/null
Recent commits:
!git log -10 --format='%h %s' 2>/dev/null || echo "No commits"
PRs
!gh pr list --limit 5 2>/dev/null || echo "gh not available or no PRs"
Steps
- •Check --resume availability: Read
_runtime.hostnamefrom state.json. If it matches current hostname (hostname -s) andsession_iddiffers from current session, the previous session may be resumable at protocol level. Note this in output:Previous session resumable: claude --resume <session_id>. This gives full context replay vs. lossy handoff rehydration. - •Analyze pre-loaded state above. Check
sourcefield for confidence ("manual-end" > "auto-save" > "init") - •Check drift: verify Structure paths from CONTEXT.md still exist (Glob), report missing/new files
- •Check active tasks:
TaskList,TaskGetfor each — identify handoff/blocker/resume metadata
Hydrate tasks from state.json (idempotent):
- •Check existing tasks first — if tasks with metadata
handoff: trueand matchingsessionalready exist for the current session, skip creation (prevents duplicates on repeated invocation) - •Complete previous handoff tasks from prior sessions (
TaskUpdate status: "completed") - •Create blocker tasks from blockers array (metadata:
blocker: true, handoff: true, session: "${CLAUDE_SESSION_ID}") - •Create resume task from resume object (metadata:
resume: true, handoff: true, session: "${CLAUDE_SESSION_ID}") - •Set dependencies: resume blocked by blockers
Output read-back:
code
╔═══════════════════════════════════════════╗ ║ HANDOFF RECEIVED ║ ║ Project: [name] | Stack: [stack] ║ ║ Severity: [emoji] ║ ╚═══════════════════════════════════════════╝ 💡 RESUMABLE: claude --resume <session_id> (only if hostname matches — full context replay vs lossy rehydration) SINCE LAST SESSION ├─ Commits: [N] | PRs: [N] merged └─ Tasks: [N] hydrated ⚠️ WATCH OUT FOR / 🚫 BLOCKERS / ❌ FAILED [lists] ▶️ RESUME [Next action, files, context] ──────────────────────────────────── Ready. What would you like to work on?