Two layers of session capture
Stop hook (automatic)
Fires after every turn. Writes .agentic/context.md with recent user messages, files touched, uncommitted changes, and tools used. Zero ceremony - it just runs.
/ds-wrap (on demand)
Replaces the stop hook's raw snapshot with a structured, enriched version. Captures decisions, conventions, and gotchas into AGENTS.md and memory. Merges across sessions.
If /ds-wrap has already written .agentic/context.md, the stop hook appends a Session Activity block instead of overwriting - so /ds-wrap content is never lost.
The stop hook is the safety net - you always get something. /ds-wrap is the upgrade - you get structured, compounding context.
Close the session cleanly so the Stop hook can finish writing .agentic/context.md. In the terminal CLI, use /exit rather than ctrl+c (ctrl+c can interrupt the hook and lose session state). In the desktop or web app, /exit is not available - just close the window or tab normally rather than force-quitting.