Every session you've ever had with Claude Code — every decision, every architecture call, every lesson learned — stored, searchable, and available as context in any future session. Not summaries. Full transcripts. Weeks, months, hundreds of sessions, all at your fingertips. Sessions fill. Compacts happen. Claude Code keeps going — because XF-MEM never forgot.
Connect with GitHub — it's freeThe Stop hook fires when your CC session ends. XF-MEM reads the full JSONL transcript — every message, every tool call, every decision — and writes a snapshot to your workspace. No configuration. No prompts. Every session, always.
XF-MEM reads the actual CC JSONL transcript file, not a structured summary. Every message you and Claude Code exchanged is stored. Semantic search finds what you actually said, not a paraphrase of it. 'We decided to use pgvector instead of Pinecone because of latency' — searchable, verbatim, months later.
Run /xf-mem mid-session to snapshot right now — before a risky refactor, at XFTC's 60% nudge, or any time you want a checkpoint. Run /xf-memr "query" to pull semantically matched context from any prior session. pgvector embeddings over chunked transcripts — not keyword matching, not a keyword search. Finds what you said, not just what you typed.
Snapshots write to your local workspace (~/.claude/xf-mem/snapshots/) first — always, on every plan. Disk is cheap. Months of sessions cost megabytes. Semantic search across sessions requires BYODB: connect your own Supabase, Neon, or any Postgres+pgvector instance. Your session data never touches Dispatch servers.
A month of daily sessions is a few hundred megabytes. That's the entire decision history of a product — every architecture tradeoff, every bug root cause, every 'we tried this and it didn't work'. XF-MEM stores it all locally by default. Connect BYODB and every session is semantically searchable across the entire history. Claude Code walks into any new session already knowing everything that came before.
The Build State Protocol loads your last session snapshot at the start of every new conversation. Claude Code resumes with full context of what was built, what's broken, what decisions were made, and what's next — without you re-explaining anything.
When XFTC fires its 60% nudge, the recommended sequence is /xf-mem snapshot then /compact. The snapshot captures the full transcript before anything is compressed. After compact, the session continues with zero context loss — XF-MEM has it all.
Session ends — Stop hook fires.
capture.py reads the full JSONL transcript from CC's session file.
Snapshot written to ~/.claude/xf-mem/snapshots/ (workspace, always).
If BYODB configured: embed.py chunks the transcript and embeds to your pgvector instance.
Next session: Build State Protocol loads the last snapshot automatically.
Recall any prior session: /xf-memr "what we decided about auth" — returns closest semantic match.