XF-MEM
XF Memory · XF-MEM

Claude Code never forgets what you built together.

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 free

What it does

1

Automatic snapshot at every session end — no commands required.

The 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.

2

Full conversation capture — not a summary.

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.

3

Two commands: /xf-mem to store, /xf-memr to recall.

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.

4

Workspace storage by default. BYODB for semantic search.

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.

5

Months of sessions. All available for context. Instantly.

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.

6

Session context carry-over — next session picks up automatically.

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.

7

XFTC triggers snapshot at 60% — nothing lost on compact.

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.

How it works

1

Session ends — Stop hook fires.

2

capture.py reads the full JSONL transcript from CC's session file.

3

Snapshot written to ~/.claude/xf-mem/snapshots/ (workspace, always).

4

If BYODB configured: embed.py chunks the transcript and embeds to your pgvector instance.

5

Next session: Build State Protocol loads the last snapshot automatically.

6

Recall any prior session: /xf-memr "what we decided about auth" — returns closest semantic match.

● ● ●
◈ XF-MEM ✓ snapshot saved
247 turns · written to ~/.claude/xf-mem/snapshots/
embedded to Supabase pgvector (BYODB)
$ /xf-mem search "flutter oauth redirect"
↳ Session 2026-03-21 — 'We decided OAuth redirects to /dashboard, not /'
Other modules