Two layers of session capture
Stop hook (automatic)
Fires after every turn. Writes this session's shard at .agentic/context.d/<session_id>.md - recent user messages, files touched, uncommitted changes, tools used - then recomposes .agentic/context.md from it. 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.
/ds-wrap content is never lost, and now neither is anyone else's: the two live in separate files. /ds-wrap owns the curated .agentic/_wrap.md; the stop hook owns per-session shards. .agentic/context.md is derived from both on every turn, so a lost update self-heals instead of destroying a session's work.
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.