end_session
Capture a structured session handoff by writing a checkpoint, decisions, open loops, and more to a local database. Ensures the next session resumes smoothly with full context.
Instructions
Capture a structured session handoff. Writes multiple records to the local SQLite database: one checkpoint (required), plus optional decisions, open loops, preferences, constraints, warnings, relational delta, and next session focus. Each record is stored with a typed 'type' column (not content prefixes) and linked to a session record via session_id. Also creates a session row in the sessions table with a summary, orientation score, and gap count. The checkpoint is retrievable by boot_report on the next session start. All records are searchable via search_memory and list_memories. Call this at the end of every substantive session to ensure the next session can pick up the thread.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checkpoint | Yes | Where we left off — the single most important handoff artifact. Stored as type='checkpoint' with importance 8. This is what boot_report loads as the latest checkpoint on the next session start. | |
| decisions | No | Key decisions made this session and their rationale. Each entry is stored as a separate memory with type='decision' and importance 7. | |
| open_loops | No | Unresolved questions, pending tasks, or threads that need follow-up. Each entry is stored as type='open_loop' with importance 7. | |
| preferences | No | New user preferences or working style observations learned this session. Each entry is stored as type='preference' with importance 6. | |
| constraints | No | Boundaries that must not be violated — violating these causes trust damage. Each entry is stored as type='constraint' with importance 9 (highest default). | |
| warnings | No | Hazards or risks the next session should be aware of. Each entry is stored as type='warning' with importance 8. | |
| relational_delta | No | What changed in the working relationship this session — trust shifts, tension, repair, tone changes. Stored as type='relational_delta' with importance 8. | |
| next_session_focus | No | Where to resume next session, which may differ from where we stopped. Stored as type='next_session_focus' with importance 7. | |
| project | No | Project name to scope all records to. Passed through to each stored memory's project field. | |
| transcript_path | No | File path to the session transcript, stored on the session record for reference by boot_report. | |
| session_id | No | Current session ID. Used to check for unreviewed PreCompact captures. If captures exist for this session that were not read via read_capture, a warning is included in the response. |