Session Continuation
Manage workflow state across sessions with handoff and resume.
When to Use
- Runtime reports that the session is approaching its context-warning threshold
- User says "handoff", "save", "pause"
- User says "resume" + workflow ID
- Session ending with incomplete workflow
- Incomplete workflow from previous session
Plan State Variables
state_vars[4]{var,purpose,persistence}:
MEOWKIT_ACTIVE_PLAN,Current active plan path,Session temp file
MEOWKIT_SUGGESTED_PLAN,Branch-matched plan hint,Inferred from git branch
MEOWKIT_COMPLEXITY,Auto-detected task complexity,Session memory
MEOWKIT_ACTIVE_AGENTS,Currently active agents,Session memory
Process
- Detect trigger — token limit, user command, or session ending
- If handoff — load
references/handoff-flow.md, execute save + summary - If resume — load
references/resume-and-state.md, execute load + restore + continue - If list — show all saved workflows from
.meowkit/state/workflows/
References
| Reference | When to load | Content |
|---|---|---|
| handoff-flow.md | On handoff/save trigger | State save format, summary generation |
| resume-and-state.md | On resume trigger | Resume steps, state management, error handling, TOON format |
Quick Commands
workflow:handoff → Save state + get resume instructions
workflow:resume AUTH-123 → Load state + continue from last phase
workflow:list → Show all saved workflows
Gotchas
- Stale handoff after codebase changes: Saved state references files that were renamed or deleted → Validate all file paths in handoff state before resuming
- TOON corruption on concurrent sessions: Two agents writing state simultaneously → Use file locking or session-scoped state files