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