Skip to content

BetterDB Memory for Claude Code v0.4.0

Choose a tag to compare

@KIvanow KIvanow released this 02 Jul 13:30
b30af1e

Recall-quality release: memories now embed their full structured detail, recall gates honestly instead of confabulating, and a fresh install produces embeddings with zero configuration.

Highlights

  • Richer embeddings — decisions, patterns, problems, and open threads are now folded into the embedded text (previously only the one-line summary was embedded), so recall can actually see a session's substance. Bare file paths are excluded as noise.
  • Threshold-gated, escalating recall — over-fetch → relative gate → narrow, escalating project+branch → project → cross-project. A miss is honest ("nothing cleared the bar") rather than surfacing the least-bad match, and the reader contract instructs the model not to fabricate or substitute a codebase grep for recall.
  • Model-agnostic gate — relative floor/margin/separation instead of a fixed similarity threshold, so it transfers across embed models that compress cosine similarity into different bands.
  • Zero-config on-device embeddings — falls back to all-MiniLM-L6-v2 (384-dim, Apache-2.0) when no Ollama/API provider is present; weights download once and cache.
  • Native branch scope + content-type tags — branch maps to the store's thread scope and content types to tags (decision/pattern/problem/open-thread); search_context gains a tags filter.
  • Single, configurable recall decay — dropped the dead decayRate knob and exposed the store's real composite decay (BETTERDB_RECALL_HALF_LIFE_DAYS + weights).
  • New ops surface — status reports live store stats; a scoped forget CLI (dry-run by default, refuses unbounded deletes) previews exactly what it will delete.
  • Local dev Docker setup — docker compose for valkey-search + Ollama.

Fixes

  • Cross-project scope="all" requests are no longer silently downgraded when BETTERDB_ALLOW_CROSS_PROJECT is off — the miss message says widening is disabled instead of offering a retry the config would refuse.
  • Escalating recall no longer reinforces the pre-gate over-fetch pool, so gated-out candidates don't skew composite ranking.
  • forget dry-run now previews via the same native scope filter forgetByScope deletes with, so the preview matches --apply exactly.
  • search_context/session-context excerpts now include pattern text, so pattern-filtered hits are answerable from the tool output.