Session Handoffs
Handoffs should be explicit, context-rich, and replayable.
Use workflow run handoff instead of ad hoc "complete + add" sequences.
Why workflow handoff
workflow run handoff performs a coordinated transition:
- Validates source task status.
- Creates follow-on task.
- Carries recent checkpoint context.
- Completes source task.
Carried context is placed in:
- follow-on description (pickup context), and
- an initial follow-on checkpoint (history/debug context).
Basic handoff
bash
hzl workflow run handoff \
--from <task-id> \
--title "Prepare final publish assets" \
--project marketingOmitting --agent is intentional pool routing when --project is provided.
Targeted handoff to specific agent
bash
hzl workflow run handoff \
--from <task-id> \
--title "Apply final legal edits" \
--project writing \
--agent writer-2Carry controls
bash
hzl workflow run handoff \
--from <task-id> \
--title "Follow-up" \
--project writing \
--carry-checkpoints 5 \
--carry-max-chars 4000Guardrail behavior
Handoff requires routing clarity:
- provide
--agent, or - provide
--project, or - provide both.
If omitted, command fails with an actionable message.
Idempotent retries
bash
hzl workflow run handoff --from <id> --title "..." --project writing --op-id handoff-2026-02-27-01Use --auto-op-id when you want deterministic key generation from normalized input.