Claude Code session

Continuity V2

Long-term memory for Claude Code. Indexes every session as SQLite+FTS5, exposes recall via MCP, and ships PreCompact/PostCompact hooks so nothing is ever lost.

36 stars 8 forksSessions & history Source

Install

From source
git clone https://github.com/Haustorium12/continuity-v2.git

From the README

continuity v2

Long-term memory layer for Claude Code, built on the JSONL session record.

What this is

continuity (v1) protected against compaction *within* a single session — PreCompact hook saves a checkpoint, SessionStart hook injects it back, SSE proxy rings bells at 70/85/95% token pressure.

continuity v2 solves the other half: across-session recall.

Every Claude Code session is already written to disk as a JSONL — every turn, every tool call, every response. Plain text. Append-only. Free.

That file is an episodic memory store hiding in plain sight. v2 is the index, search, and retrieval layer on top of it.

Architecture

Build stages

Stage 1 — Index (MVP)

Walk ~/.claude/projects/, extract every turn into SQLite with FTS5:

Literal full-text search across every conversation ever had with Claude Code. Filterable by project, reverse-chronological.

Stage 2 — MCP tool

Wire it into the existing claude-memory MCP (port 8200) or stand alone.

- search_sessions(query, limit=10) — FTS5 search, returns matching turns + session ID + surrounding context
- recall_session(session_id, range="full") — return full or sliced session
- recent_sessions(n=10) — list recent sessions with first/last user message

Stage 3 — Semantic recall

Sentence embeddings + SIMILAR_TO edges. Hybrid search: literal + semantic.

For when the words don't match but the concept does ("when did we talk about the thread-home problem" should match conversations about "Hal", "50 First Dates", "Alice in Wonderland").

find_similar(query, limit=10) — find semantically similar turns via ANN search over
all-MiniLM-L6-v2 embeddings, re-ranked by a hybrid score:

Build: python embed.py (idempotent — skips turns already embedded), then
python wire_similar.py to wire SIMILAR_TO edges between turn pairs with…
Read the full README on GitHub

Details

Language
Python
License
MIT
Last updated
14 June 2026
Topics
claudeclaude-codecompactiondeveloper-toolshooksmcpmemorysqlite

FAQ

What is Continuity V2?

Long-term memory for Claude Code. Indexes every session as SQLite+FTS5, exposes recall via MCP, and ships PreCompact/PostCompact hooks so nothing is ever lost. It is a session for Claude Code, from Haustorium12/continuity-v2 on GitHub.

How do I install Continuity V2?

Clone Haustorium12/continuity-v2 from GitHub and follow the setup steps in its README.

Is Continuity V2 popular?

Haustorium12/continuity-v2 has 36 GitHub stars and 8 forks. It was last updated on 14 June 2026.

More sessions & history

Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.