session_close
Persist session reflections and compliance data to close a session. Supports file-based or inline payload, auto-generating task completion.
Instructions
Persist session with compliance validation. Two modes: (1) Write closing_reflection and other payload to {gitmem_dir}/closing-payload.json, then call with session_id + close_type. (2) Pass closing_reflection directly as a parameter (simpler). Both work — inline params override file payload. task_completion is auto-generated. DISPLAY: Output the display field verbatim.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| close_type | Yes | Type of close (standard requires full reflection) | |
| session_id | Yes | Session ID from session_start | |
| linear_issue | No | Associated Linear issue | |
| human_corrections | No | Human corrections or 'none' | |
| closing_reflection | No | Session reflection (alternative to writing closing-payload.json). Keys: what_broke, what_took_longer, do_differently, what_worked, wrong_assumption, scars_applied, institutional_memory_items, collaborative_dynamic, rapport_notes | |
| ceremony_duration_ms | No | End-to-end ceremony duration from agent perspective (in milliseconds) |