XF-MEM
XF Memory · XF-MEM

Every word you type carries the context of everything you've ever built. Now Claude's does too.

Humans communicate by intent — and that intent is built on a lifetime of accumulated context. A single word from an expert carries decades of meaning. XF-MEM gives Claude Code the same thing. Not a database. Not a list of sessions. A living tree that grows from every conversation you have — branches forming, groupings emerging, context compounding. The longer you run it, the less you have to explain. Claude already knows.

Connect with GitHub — it's free

What it does

1

The tree grows. You never organize it.

XF-MEM builds its structure from your conversations — not from a schema you defined, not from categories someone else decided. A single decision becomes a node. Related decisions cluster into a branch. Branches grow into domains. The organization is a product of how you actually work, which means it reflects how you actually think. No folders. No tags. No maintenance.

2

Finite points become groupings. Leaves become branches.

Early sessions add individual context — a decision here, an architecture call there. Over time those points connect. A leaf on auth becomes a branch on your entire security model. A note on a specific bug becomes a cluster on how your data layer behaves under load. The tree doesn't just store — it organizes by connection, and that organization gets richer every session.

3

The longer you run it, the less you have to say.

By session 10, Claude knows your stack. By session 50, it knows your patterns, your preferences, and the reasoning behind every call you've made. Newer decisions supersede older ones automatically. Contradictions surface. The tree compounds. This is the only memory system that gets more valuable the more you use it — and more yours.

4

Full conversation capture — not a summary.

XF-MEM reads the actual CC JSONL transcript — every message, every tool call, every decision. Semantic search finds what you actually said, not a paraphrase. 'We decided to use pgvector instead of Pinecone because of latency' — searchable, verbatim, months later.

5

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. Finds what you said, not just what you typed.

6

Workspace storage by default. Connect your own vector database for deeper retrieval.

Snapshots write to your local workspace (~/.claude/xf-mem/snapshots/) — always, on every plan. Disk is cheap. Months of sessions cost megabytes. For semantic search across your entire session history, connect your own vector database — Supabase, Neon, or any Postgres+pgvector instance. Vector search finds what you meant, not just what you typed. Your session data never touches Dispatch servers.

7

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

At 60% context fill, XFTC nudges: snapshot + compact now, while the transcript is still clean. At 85%, it blocks the next tool call entirely — last safe exit before Claude Code auto-compacts without warning. The snapshot captures the full transcript before anything is compressed. After compact, the session continues with zero context loss. XF-MEM has it all. The tree keeps growing.

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 (your vector database)
$ /xf-mem search "flutter oauth redirect"
↳ Session 2026-03-21 — 'We decided OAuth redirects to /dashboard, not /'
Other modules