All notable changes to lean-memory are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- CI: all workflow actions bumped to their Node 24 majors (checkout v7,
setup-python v7, upload-artifact v7, download-artifact v8, setup-uv
v9.0.0 with explicit
activate-environment: true), clearing GitHub's Node 20 runtime deprecation warnings. No user-facing changes.
0.2.1 - 2026-07-21
Metadata-only release for the public launch — no code changes.
lean-memory-consolehad a blank PyPI page: its README is now wired as the package long description, and license, authors, keywords, classifiers, and project URLs are declared (none were before).- Two relative links that 404 on PyPI (README → ARCHITECTURE.md, console README → core README) are now absolute GitHub URLs.
- Core package: added Documentation / Changelog / Issues project URLs.
- Claude Code plugin marketplace manifest: added the discovery metadata directories rank on (category, keywords, homepage, repository, license).
- Launch copy (
docs/launch/) tightened after adversarial review: the "no other memory product stages agent-proposed changes for approval" superlative is replaced with a defensible differentiator, positioning vs built-in Claude Code memory added, "no Docker" added to the differentiation copy, measured calibration figures removed from post bodies per the no-benchmark-numbers launch rule.
0.2.0 - 2026-07-17
- Sleep-time maintenance — an offline job that cleans up stored memory
between sessions (dedupe, summarize-old, evict-low-value) while preserving the
ADD-only spine and as-of query semantics. Nothing is ever deleted: maintenance
only appends, retires via the existing
superseded_byflip, or demotes to a cold tier, so full history stays queryable at any past point in time — bit-for-bit identical at the store visibility predicate, pinned by executable tests. Design:docs/superpowers/specs/2026-07-16-sleep-time-maintenance-design.md.lean-memory-maintainCLI (in the core package besidelean-memory-mcp) — dry-run by default;--applyruns the auto band and stages proposals,--auto-onlyruns only the provably-safe band,--jsonemits a machine-readable report.--rootdefaults to$LM_DATA_ROOT;--namespacescopes to one namespace. Ships a cron/launchd recipe in the README.- Two-tier autonomy — only exact-duplicate retirement and a strict eviction band auto-apply. Near-duplicate merges, summaries, and softer evictions are staged as proposals a human reviews; an unreviewed proposal expires after 30 days (default) rather than auto-applying — silence is never consent.
- Console Review page — the memory console gains a
Reviewpage: the pending-proposal queue grouped by entity with per-kind before/after evidence, Approve / Keep / Edit-then-approve / Promote verbs, batch-approve per entity, and a run-maintenance button (dry-run by default, apply behind a confirm). Backed by five auth-gated console routes (/views/{ns}/review/*,/views/{ns}/maintenance/*) that reach the engine only through the gateway; double-decides surface as HTTP 409 with the compare-and-set outcome passed through, so the console and Claude Code can review the same queue without double-applying. Also closes the four WP10a carry-in cleanups (summarizer budget-check ordering, CLI missing-namespace guard,Store.pathon the ABC, tool-docstring apply/auto-spawn asymmetry). - Conversational review in Claude Code — four MCP tools
(
memory_maintenance_run, dry-run by default;memory_maintenance_status, model-free;memory_review_queue;memory_review_decide) on the corelean-memory-mcpserver plus both console MCP surfaces, areview-memory-maintenanceMCP prompt (console MCP surfaces), and a/review-memoryplugin command that walks the queue grouped by entity and records only explicit user verdicts. - Tier-filtered retrieval — default latest-mode search hides cold-demoted
facts;
as_ofqueries never filter tier, andsearch(..., include_cold=True)opts out. Promotion back to hot is explicit-only — reads never durably change surfaces. - Schema v2 —
user_version-gated 1→2 migration (v1-format files upgrade in place, verified by a checked-in fixture) addingrecord_kind,fact_derivationlineage, and themaintenance_run/maintenance_proposalledger tables. Two exact-no-op ingest hooks (duplicate-cascade, summary-staleness cascade) keep offline transforms coherent under later ingest; both are byte-identical no-ops until maintenance has ever run. - Concurrency & crash safety — engine-wide
PRAGMA busy_timeout, abatch()unit-of-work, an atomic maintenance lease with heartbeat and crash-resume, andmemory_clearrefusing while a live maintenance lease is held.LM_MAINT_AUTO=1opts into a detached background auto-run on the first tool call of a stale namespace (off by default).
0.1.3 - 2026-07-12
Publish-readiness release: an independent multi-team review of v0.1.2 found three launch blockers on the canonical MCP first-run path plus packaging and correctness majors — all fixed here.
- MCP Registry install crashed on startup:
server.jsonranuvx --from lean-memory lean-memory-mcp, butmcpis an optional extra, so every registry install died withModuleNotFoundError. The manifest now installslean-memory[mcp,models,extract](pinned by a manifest test). - Model banner corrupted the MCP stdio stream: gliner2's
from_pretrainedprints a config banner to stdout — the JSON-RPC channel — on the firstmemory_addof the canonical install. All model lazy-loads (GLiNER2, SentenceTransformer, CrossEncoder) now route load-time chatter to stderr. - Embedder swap bricked existing namespaces: reopening a DB created with a
different embedder dimension (768-dim offline stub → 1024-dim Qwen after
installing
[models]) failed deep in retrieval with an opaque shape error; the store now refuses the mismatch at open with an actionable message. - Uppercase FTS5 operator words crashed search:
'coffee AND tea'raisedsqlite3.OperationalErrorthroughMemory.searchand thememory_searchtool. Terms are now quoted FTS5 string literals; the sparse arm degrades to no-hits on any residual syntax error. - Functional-slot supersession left stale facts current: a replacement retired only the single most-similar fact, so a slot extended by an additive cue ("I also work at Globex.") kept two conflicting current employers. A replacement on a functional slot now retires every co-valid latest fact; multi-valued slots keep single-target retirement.
- High-similarity band ignored multi-valued slots: with real embedders,
distinct co-valid values on a multi-valued slot (jazz/blues) embed at cosine
0.6–0.95 and were silently superseded; multi-valued predicates now stay
co-valid in every band (new resolver route:
high_extends_additive). Predicate-scoped on purpose: the textual cue ("and"/"also") stays a low/mid-band signal so a conjunction-phrased replacement still supersedes. [llm]extra crashed every add() with Ollama stopped:Memory.addnow catchesTyperErrorand stub-types the escalated batch, as the typer contract always documented.- Packaging: Apache-2.0
LICENSEadded (repo, wheel, and sdist — the license was previously declared but its text shipped nowhere); the sdist is scoped to user-facing files (0.1.2 shipped internal strategy docs, agent instructions, and the bench harness to PyPI); the README hero GIF uses an absolute URL so the PyPI page renders it; the demo-agent flow is clone-based (the script was never in the wheel).
- Schema-version stamp (
PRAGMA user_version = 1) as the migration anchor for 0.1.x namespace files (pre-stamp files upgrade in place; newer stamps are never downgraded). LM_FORCE_STUBSenv var pins the offline stub backends in the MCP server (for tests/CI that must never load a model).- Subprocess-level MCP stdio protocol test: handshake + real tool call, every stdout line must parse as JSON. CI matrix now covers Python 3.11/3.12.
0.1.2 - 2026-07-12
- MCP Registry namespace case:
io.github.Wuesteon/lean-memory(the registry's PyPI ownership marker is compared case-exactly against the published README).
0.1.1 - 2026-07-12
- MCP Registry metadata:
server.json(io.github.wuesteon/lean-memory) and an OIDC publish workflow;mcp-nameownership marker in the README (required by the registry's PyPI validation — the reason for this patch release).
0.1.0 - 2026-07-12
First public release. lean-memory is an embedded, local-first agent-memory
engine: one SQLite file per namespace, hybrid dense+sparse retrieval with
rerank, and ADD-only supersession queryable at any past point in time
(as_of). No server, no daemon, no mandatory cloud key.
- MCP server exposing memory as three tools (
memory_add,memory_search,memory_clear) for Claude Code, Claude Desktop, and other MCP clients. Canonical installpip install 'lean-memory[mcp,models,extract]'opportunistically upgrades each backend whose extra is present (real embedder- reranker via
[models], GLiNER2 extraction via[extract]) and otherwise falls back to deterministic offline stubs. Two-minute quickstart with copy-paste Claude Code / Claude Desktop config and a demo GIF.
- reranker via
Memory.search(now=...)— recency decay now anchors to a caller-supplied timestamp, so the 0.2 recency term is no longer dead on historical corpora.- Point-in-time queries via
as_of(epoch ms) withis_latest_only=False. - CI + release workflows (GitHub Actions): offline test matrix on
ubuntu/macOS × Python 3.10/3.13, plus build-and-publish to PyPI on
v*tag via Trusted Publishing. - PyPI metadata: keywords, classifiers, and project URLs.
- Default embedder is now the ungated Qwen3-Embedding-0.6B (was a gated
Gemma model that broke the
[models]first run). Reranker default is Ettin-32M; both are pinned ungated and covered by regression tests. - Escalation engine recalibrated on real conversational turns. Endpoint-
scoped coreference/ellipsis detection replaces the whole-text pronoun scan
(coreference escalations dropped from 65.6% to effectively nil on real
turns), and the
prior_entitytrigger was retired (subject re-mention is normal discourse, measured at 52.8% of candidates). At the re-frozen(typing_threshold=0.4, conf_threshold=0.4)operating point, escalation on the real LongMemEval probe is 14.6% (was ~96% pre-fix), with the residual being irreducible inferential-edge (derives) escalations. BET-2 three-gate revalidation PASSes at this operating point. - Extraction granularity calibrated — GLiNER candidate threshold set to
0.4, cutting the extractor from ~8 facts/turn to ~3.7 so
fact_textreads as facts rather than whole utterances. - MCP server loads models lazily (first tool call rather than import) so a cold-cache spawn answers the MCP handshake immediately instead of blocking on a model download; search output is deduplicated.
- Sparse BM25 retrieval arm now honors the
as_ofinterval predicate. - Known-entities handed to the router/typer are capped at the 100 most recent.