Save Handoff Receipt
save_handoff_receiptRecord completed work and required next steps as a workspace handoff receipt before stopping or transferring work, so another agent can resume with clear obligations and evidence.
Instructions
Record what this agent run did and what the next agent must do, as a handoff receipt for the current workspace. Use it before stopping or handing work to another agent or model; read the current state with get_handoff_status. A receipt with status 'open' (the default) marks the workspace as blocked until a later receipt supersedes it with status 'closed' and a closure (closed_by, closed_at, closure_basis). It becomes stale automatically when any file listed in invalidation.stale_if changes after it was saved. Receipts are stored as new JSON files in the archive (never overwritten), indexed, and ranked first in search_history. Returns the saved file name and its receipt_id (pass that as 'supersedes' later).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| client | No | Archive namespace (a subfolder of the chats directory). Built-in: 'default', 'cursor', 'chatgpt', 'claude'; any other name creates its own subfolder. Omit to use 'default'. | default |
| status | No | 'open' (work outstanding, blocks the workspace) or 'closed' (finished; needs 'closure'). | open |
| closure | No | Required to close: {'closed_by': str, 'closed_at': ISO-8601 str, 'closure_basis': str, 'closure_evidence': str}. | |
| evidence | Yes | Proof: {'checks_run': [{'command': str, 'exit_code': int, 'stdout_summary': str}], 'missing_evidence': [str] (checks skipped or not yet run)}. | |
| receipt_id | No | Explicit receipt id. Defaults to '<workspace-hash>_<unix-time>'. | |
| supersedes | No | receipt_id of the earlier receipt this one replaces, forming a chain. | |
| work_state | Yes | What was done: {'touched_surfaces': [{'file_path': str, 'summary': str, 'why': str}], 'dependencies': [str]}. | |
| obligations | Yes | What was promised: {'promise': str (the goal), 'scope': [str] (areas or files in scope)}. | |
| invalidation | Yes | When to distrust this receipt and what to do next: {'stale_if': [{'file_path': str} or {'glob_pattern': str}], 'next_safe_action': str (a direct instruction for the next agent)}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |