Skip to main content

Session Handoff

Benchmarked against: Anthropic โ€” Context editing Source: Agent Intelligence Protocol ยง5b Decision: Cloud UB ub-7c698cb60299

Session Handoff ensures unfinished work survives across sessions. When a session ends โ€” whether intentionally or due to context limits โ€” the agent's todo list persists to Cloud UB and is automatically restored in the next session.


How it worksโ€‹

At session end (Pre-Exit)โ€‹

1. Agent detects session ending
2. Unfinished TaskList items โ†’ ingest_fragment() to Cloud UB
3. Title: "Session Handoff โ€” {agent_identity} โ€” {date}"
4. Tags: session-handoff

At next session start (SessionStart hook)โ€‹

1. Hook auto-queries Cloud UB for session-handoff entries
2. Matching entries โ†’ injected into agent context
3. Agent rebuilds TaskList from handoff data
4. Work continues where it left off

Why not mailbox?โ€‹

Captain explicitly decided against using agent mailbox for handoffs โ€” messages get missed too easily. Cloud UB with structured tags is more reliable and searchable.

Formatโ€‹

The handoff entry contains:

FieldContent
TitleSession Handoff โ€” Mac CLI ๅฐๅ…‹ โ€” 2026-03-05
Tagssession-handoff, [ship]
ContentUnfinished todos with status, current context, next steps

Display formatโ€‹

Todo items use CLI-style indicators:

โ–  Completed task
โ–ก Pending task
โ–ถ In-progress task

What gets handed offโ€‹

IncludedNot included
Unfinished todo itemsCompleted items
Current task contextFull conversation history
Blockers and next stepsTemporary debug state
Key decisions made this sessionRoutine operations