freshcrate
Skin:/
Home > MCP Servers > claude-mem-lite

claude-mem-lite

Lightweight persistent memory system for Claude Code โ€” FTS5 search, episode batching, error-triggered recall

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

Lightweight persistent memory system for Claude Code โ€” FTS5 search, episode batching, error-triggered recall

README

English | ไธญๆ–‡

claude-mem-lite

Lightweight persistent memory system for Claude Code. Automatically captures coding observations, decisions, and bug fixes during sessions, then provides full-text search to recall them later.

Built as an MCP server + Claude Code hooks. Zero external services, single SQLite database, minimal overhead.

Why claude-mem-lite?

A ground-up redesign of claude-mem, replacing its heavyweight architecture with a smarter, leaner approach.

Architecture comparison

claude-mem (original) claude-mem-lite
LLM calls Every tool use triggers a Sonnet call Only on episode flush (5-10 ops batched)
LLM input Raw tool_input + tool_output JSON Pre-processed action summaries
Conversation Multi-turn, accumulates full history Stateless single-turn extraction
Noise filtering LLM decides via "WHEN TO SKIP" prompt Deterministic code-level Tier 1 filter
Runtime Long-running worker process (1.8MB .cjs) On-demand spawn, exits immediately
Dependencies Bun + Python/uv + Chroma vector DB Node.js only (3 npm packages)
Source size ~2.3MB compiled bundles ~50KB readable source
Data directory ~/.claude-mem/ ~/.claude-mem-lite/ (hidden, auto-migrates)

Token & cost efficiency

For a typical 50-tool-call session:

claude-mem claude-mem-lite Ratio
LLM calls ~50 (every tool use) ~5-8 (per episode) 7-10x fewer
Tokens per call 1,000-5,000 (raw JSON + history) 200-500 (summaries only) 5-10x smaller
Total tokens ~100K-250K ~1K-4K 50-100x less
Model cost Sonnet ($3/$15 per M) Haiku ($0.25/$1.25 per M) 12x cheaper
Combined savings 600x+ lower cost

Quality comparison

Dimension Winner Why
Classification accuracy Tie Both produce correct type/title/narrative
Noise filtering lite Code-level filtering is deterministic; LLM "WHEN TO SKIP" is unreliable
Observation coherence lite Episode batching groups related edits into one coherent observation
Code-level detail original Sees full diffs, but rarely useful for memory search
Search recall Tie Users search semantic concepts ("auth bug"), not code lines
Hook latency lite Async background workers; original blocks 2-5s per hook

Design philosophy

The original sends everything to the LLM and hopes it filters well. claude-mem-lite filters first with code, then sends only what matters to a smaller model. This is not a downgrade; it's a smarter architecture that produces equivalent search quality at a fraction of the cost.

Features

  • Automatic capture -- Hooks into Claude Code lifecycle (PostToolUse, SessionStart, Stop, UserPromptSubmit) to record observations without manual effort
  • Hybrid search -- FTS5 BM25 + TF-IDF vector cosine similarity, merged via Reciprocal Rank Fusion (RRF). FTS5 handles keyword matching; 512-dim TF-IDF vectors capture semantic similarity for recall beyond exact terms
  • Timeline browsing -- Navigate observations chronologically with anchor-based context windows
  • Episode batching -- Groups related file operations into coherent episodes before LLM encoding
  • Error-triggered recall -- Automatically searches memory when Bash errors occur, surfacing relevant past fixes
  • Proactive file history -- When editing a file, automatically shows relevant past observations for that file
  • Session summaries -- LLM-generated summaries at session end (via background workers using claude -p)
  • Project-scoped context -- Injects recent memory into CLAUDE.md and session startup for immediate context
  • Observation types -- Categorized as decision, bugfix, feature, refactor, discovery, or change
  • Importance grading -- LLM assigns 1-3 importance levels (routine / notable / critical) to each observation
  • Observation relations -- Bidirectional links between related observations based on file overlap
  • User prompt capture -- Records user prompts via UserPromptSubmit hook for intent tracking
  • Read file tracking -- Tracks files read during sessions for richer episode context
  • Zero data loss -- If LLM fails, observations are saved with degraded (inferred) metadata instead of being discarded
  • Two-tier dedup -- Jaccard similarity (5-minute window) + MinHash signatures (7-day cross-session window) prevent duplicates
  • Synonym expansion -- Abbreviations like K8s, DB, auth automatically expand to full forms in FTS5 search (100+ pairs including CJKโ†”EN cross-language mappings)
  • CJK synonym extraction -- Unsegmented Chinese text is scanned for known vocabulary words (ๆ•ฐๆฎๅบ“โ†’database, ๆœ็ดขโ†’search, etc.) enabling cross-language memory recall
  • Stop-word filtering -- English stop words filtered from both TF-IDF vocabulary (reclaiming ~18% of vector dimensions) and FTS queries (preventing false negatives from noise terms like "how", "the", "does")
  • Persisted vocabulary -- TF-IDF vocabulary persisted to vocab_state table, preventing vector staleness when document frequencies shift. Vectors stay valid until explicit rebuild
  • Pseudo-relevance feedback (PRF) -- Top results seed expansion queries for broader recall
  • Concept co-occurrence -- Shared concepts across observations expand search to related topics
  • Context-aware re-ranking -- Active file overlap boosts relevance (exact match + directory-level half-weight)
  • Superseded detection -- Marks older observations as outdated when newer ones cover the same files with higher importance
  • Adaptive time windows -- Session startup recall uses velocity-based time windows (high/medium/low activity tiers)
  • Token-budgeted context -- Greedy knapsack algorithm selects session-start context within a 2,000-token budget, prioritizing by recency and importance
  • Observation compression -- Old low-value observations can be compressed into weekly summaries to reduce noise
  • Secret scrubbing -- Automatic redaction of API keys, tokens, PEM blocks, connection strings, and 15+ credential patterns
  • Atomic writes -- All file writes (episodes, CLAUDE.md) use write-to-tmp + rename to prevent corruption on crash
  • Robust locking -- PID-aware lock files with automatic stale/orphan cleanup (>30s timeout or dead PID)
  • Stale session cleanup -- Sessions active for >24h are automatically marked as abandoned on next start
  • Resource registry -- Indexes installed skills and agents with FTS5 search, composite scoring, and invocation tracking; searchable via mem_registry MCP tool
  • Unified resource discovery -- Shared filesystem traversal layer (resource-discovery.mjs) used by both runtime scanner and offline indexer, supporting flat directories, plugin nesting, and loose .md files
  • Domain synonym expansion -- Registry search queries expand to domain synonyms (e.g., "fix" โ†’ debug, bugfix, troubleshoot, diagnose, repair)
  • Dual LLM mode -- Auto-detects ANTHROPIC_API_KEY for direct API calls; falls back to claude -p CLI when no key is available
  • Lesson-learned indexing -- lesson_learned field indexed in FTS5 with weight 8, making past debugging insights directly searchable
  • Cross-source normalization -- mem_search normalizes scores across observations, sessions, and prompts before merging, preventing any source from dominating results
  • Exponential recency decay -- Type-differentiated half-lives (decisions: 90d, discoveries: 60d, bugfixes: 14d, changes: 7d) consistently applied in all ranking paths
  • Prompt-time memory injection -- UserPromptSubmit hook automatically searches and injects relevant past observations with recency and importance weighting
  • Smart skill invocation -- Auto-loaded and searched managed skills/agents include portable ~ paths with Read() guidance; native plugin skills recommend Skill("full:name"); prevents Skill() misuse for managed resources that aren't registered with Claude Code's native handler
  • Dual injection dedup -- user-prompt-search.js and handleUserPrompt coordinate via temp file to prevent duplicate memory injection
  • Result-dedup cooldown -- User-prompt memory injection uses result-overlap detection (>80% ID overlap โ†’ skip) instead of time-based cooldown, allowing topic switches within seconds while preventing redundant injections
  • OR query fallback -- When AND-joined FTS5 queries return zero results, automatically relaxes to OR-joined queries for broader recall (applied in both user-prompt-search and hook-memory paths)
  • Configurable LLM model -- Switch between Haiku (fast/cheap) and Sonnet (deeper analysis) via CLAUDE_MEM_MODEL env var
  • DB auto-recovery -- Detects and cleans corrupted WAL/SHM files on startup; periodic WAL checkpoints prevent unbounded growth
  • Schema auto-migration -- Idempotent ALTER TABLE migrations run on every startup, safely adding new columns and indexes without data loss
  • Exploration bonus -- New resources in the registry get a fair chance in composite ranking; zombie resources (high recommend, zero adopt) are penalized in scoring
  • LLM concurrency control -- File-based semaphore limits background workers to 2 concurrent LLM calls, preventing resource contention
  • stdin overflow protection -- Hook input truncated at 256KB with regex-based action salvage for oversized tool outputs
  • Cross-session handoff -- Captures session state (request, completed work, next steps, key files) on /clear or /exit, then injects context when the next session detects continuation intent via explicit keywords or FTS5 term overlap
  • In-place observation updates -- mem_update tool modifies existing observations atomically (field update + FTS text rebuild + vector re-computation in one transaction), preserving original IDs and references
  • Bulk export -- mem_export tool exports observations as JSON or JSONL, with project/type/date filtering and 1000-row pagination cap with batch guidance
  • FTS integrity management -- mem_fts_check tool verifies FTS5 index health or rebuilds indexes on demand, useful after database recovery or when search results seem wrong
  • Atomic multi-table writes -- saveObservation wraps observations + observation_files + observation_vectors INSERTs in a single db.transaction(), preventing orphaned rows on crash
  • Modular NLP pipeline -- Synonym maps, stop words, scoring constants, and query building extracted into focused modules (synonyms.mjs, stop-words.mjs, scoring-sql.mjs, nlp.mjs) for independent testing and maintenance
  • Porter-aligned PRF -- Pseudo-relevance feedback terms are now stemmed with the same Porter algorithm used by FTS5, ensuring PRF expansion terms match the search index

Platform Support

Platform Status Notes
Linux Supported Primary development and testing platform
macOS Supported Fully compatible (Intel and Apple Silicon)
Windows Not supported Uses POSIX shell scripts (post-tool-use.sh, setup.sh) and Unix file locking; WSL2 may work but is untested

Requirements

  • Node.js >= 18
  • Claude Code CLI installed and configured (claude command available)
  • SQLite3 support (provided by better-sqlite3, compiled on install)
  • Platform: Linux or macOS (see Platform Support)

Installation

Method 1: Plugin Marketplace (recommended)

/plugin marketplace add sdsrss/claude-mem-lite
/plugin install claude-mem-lite

Plugin mode manages its own hooks/runtime. On session start it only checks and reports new claude-mem-lite versions; it does not self-overwrite plugin files in place. Update plugin-mode installs through Claude's plugin workflow.

Method 2: npx (one-liner)

npx github:sdsrss/claude-mem-lite

Source files are automatically copied to ~/.claude-mem-lite/ for persistence.

Method 3: git clone

git clone https://github.com/sdsrss/claude-mem-lite.git
cd claude-mem-lite
node install.mjs install

Source files stay in the cloned repo. Update via git pull && node install.mjs install.

What happens during installation

  1. Install dependencies -- npm install --omit=dev (compiles native better-sqlite3)
  2. Register MCP server -- mem server with 16 tools (search, recent, recall, timeline, get, save, update, stats, delete, compress, maintain, export, fts_check, browse, registry, use)
  3. Configure hooks -- PostToolUse, SessionStart, Stop, UserPromptSubmit lifecycle hooks
  4. Create data directory -- ~/.claude-mem-lite/ (hidden) for database, runtime, and managed resource files
  5. Auto-migrate -- If ~/.claude-mem/ (original claude-mem) or ~/claude-mem-lite/ (pre-v0.5 unhidden) exists, migrates database and runtime files to ~/.claude-mem-lite/, preserving the original untouched
  6. Initialize database -- SQLite with WAL mode, FTS5 indexes created on first server start

Restart Claude Code after installation to activate.

Migration

All installation methods auto-detect and migrate from previous versions:

From claude-mem (original ~/.claude-mem/):

  • Copy claude-mem.db โ†’ ~/.claude-mem-lite/claude-mem-lite.db (renamed)
  • Copy the runtime/ directory
  • Original ~/.claude-mem/ is preserved (no deletion, no overwrite)

From pre-v0.5 unhidden directory (~/claude-mem-lite/):

  • Entire directory is moved to ~/.claude-mem-lite/ (hidden)

In-place rename:

  • Existing claude-mem.db in ~/.claude-mem-lite/ is automatically renamed to claude-mem-lite.db

Remove old directories manually after confirming:

rm -rf ~/.claude-mem/       # original claude-mem
rm -rf ~/claude-mem-lite/   # pre-v0.5 unhidden (if not auto-moved)

Directory Structure

~/.claude-mem-lite/
  claude-mem-lite.db       # SQLite database โ€” memory (WAL mode)
  resource-registry.db     # SQLite database โ€” skill/agent registry
  runtime/
    session-<project>    # Active session state
    ep-<project>.json    # Episode buffer
    ep-flush-*.json      # Flushed episodes awaiting processing
    reads-<project>.txt  # Read file paths (collected on flush)
  managed/
    skills/              # Standalone skills: {name}/SKILL.md
    agents/              # Agent plugins: {group}/agents/{name}.md + skills/*/SKILL.md
    repos/               # Shallow-cloned source repos

Usage

MCP Tools (used automatically by Claude)

Tool Description
mem_search FTS5 full-text search with BM25 ranking. Filters by type, project, date range, importance level.
mem_recent Show most recent observations, ordered by time. Quick snapshot of latest activity.
mem_recall Recall observations related to a file. Use before editing to surface past bugfixes and context.
mem_timeline Browse observations chronologically around an anchor point.
mem_get Retrieve full details for specific observation IDs (includes importance and related_ids).
mem_save Manually save a memory/observation.
mem_update Update an existing observation in-place. Preserves original ID and references.
mem_stats View statistics: counts, type distribution, top projects, daily activity.
mem_delete Delete observations by ID with preview/confirm workflow. FTS5 cleanup is automatic.
mem_compress Compress old low-value observations into weekly summaries to reduce noise.
mem_maintain Memory maintenance: scan for duplicates/stale/broken items, then execute cleanup/dedup/rebuild_vectors operations.
mem_export Export observations as JSON or JSONL for backup or migration. Filters by project, type, date range.
mem_fts_check Check FTS5 index integrity or rebuild indexes. Use when search results seem wrong or after DB recovery.
mem_browse Tier-grouped memory dashboard. Shows observations organized by memory tier (working/active/archive).
mem_registry Manage resource registry: search for skills/agents by need, list resources, view stats, import/remove tools, reindex. Search results differentiate managed (Read path) vs native (Skill full name) invocation.
mem_use Load a skill or agent from the managed registry by name. Returns full content with portable ~ path for reload via Read().

Skill Commands (in Claude Code chat)

/mem search <query>        # Full-text search across all memories
/mem recent [n]            # Show recent N observations (default 10)
/mem recall <file>         # Show past observations for a file
/mem save <text>           # Save a manual memory/note
/mem stats                 # Show memory statistics
/mem timeline <query>      # Browse timeline around a match
/mem browse                # Tier-grouped memory dashboard
/mem <query>               # Shorthand for search

Efficient Search Workflow

1. mem_search(query="auth bug")     -> compact ID index
2. mem_timeline(anchor=12345)       -> surrounding context
3. mem_get(ids=[12345, 12346])      -> full details

Database Schema

Five core tables with FTS5 virtual tables for search:

observations -- Individual coding observations (decisions, bugfixes, features, etc.)

id, memory_session_id, project, type, title, subtitle,
text, narrative, concepts, facts, files_read, files_modified,
importance, related_ids, created_at, created_at_epoch,
lesson_learned, minhash_sig, access_count, compressed_into, search_aliases,
branch, superseded_at, superseded_by, last_accessed_at

session_summaries -- LLM-generated session summaries

id, memory_session_id, project, request, investigated,
learned, completed, next_steps, files_read, files_edited, notes,
remaining_items, lessons, key_decisions

sdk_sessions -- Session tracking

id, content_session_id, memory_session_id, project,
started_at, completed_at, status, prompt_counter

user_prompts -- User prompts captured via UserPromptSubmit hook

id, content_session_id, prompt_text, prompt_number

session_handoffs -- Cross-session handoff snapshots (UPSERT, max 2 per project)

project, type, session_id, working_on, completed, unfinished,
key_files, key_decisions, match_keywords, created_at_epoch

observation_files -- Normalized file membership for efficient file-based recall

obs_id, filename

observation_vectors -- TF-IDF vector embeddings for hybrid search

observation_id, vector (BLOB Float32Array), vocab_version, created_at_epoch

vocab_state -- Persisted TF-IDF vocabulary for stable vector indexing

term, term_index, idf, version, created_at_epoch

FTS5 indexes: observations_fts (title, subtitle, narrative, text, facts, concepts, lesson_learned), session_summaries_fts, user_prompts_fts

How It Works

Hook Pipeline

SessionStart
  -> Generate session ID (or save handoff snapshot on /clear)
  -> Mark stale sessions (>24h active) as abandoned
  -> Clean orphaned/stale lock files
  -> Query recent observations (24h)
  -> Inject context into CLAUDE.md + stdout

PostToolUse (every tool execution)
  -> Bash pre-filter skips noise in ~5ms (Read paths tracked to reads file)
  -> Detect Bash significance (errors, tests, builds, git, deploys)
  -> Accumulate into episode buffer
  -> Proactive file history: show past observations for edited files
  -> Flush when: buffer full (10 entries) | 5min gap | context change
  -> Collect Read file paths into episode on flush
  -> Spawn LLM episode worker for significant episodes
  -> Error-triggered recall: search memory for related past fixes

UserPromptSubmit (two parallel paths)
  -> [user-prompt-search.js] Auto-search memory via FTS5 + active file context
  -> [user-prompt-search.js] Inject relevant past observations with recency/importance weighting
  -> [user-prompt-search.js] Write injected IDs to temp file for dedup
  -> [user-prompt-search.js] L1 skill auto-load: match managed skill names in prompt
     -> Load content with portable ~ path + Read() guidance
     -> source="managed-skill|managed-agent", path="~/.claude-mem-lite/managed/..."
  -> [hook.mjs handleUserPrompt] Capture user prompt text to user_prompts table
  -> [hook.mjs handleUserPrompt] Increment session prompt counter
  -> [hook.mjs handleUserPrompt] Handoff: detect continuation intent โ†’ inject previous session context
  -> [hook.mjs handleUserPrompt] Semantic memory injection (hook-memory.mjs), deduped via temp file

Stop
  -> Flush final episode buffer
  -> Save handoff snapshot (on /exit)
  -> Mark session completed
  -> Spawn LLM summary worker (poll-based wait)

Resource Registry

The resource registry (registry.mjs, registry-retriever.mjs) indexes installed skills and agents into a searchable FTS5 database. Unlike the previous proactive dispatch system, the registry is now on-demand โ€” Claude searches it via the mem_registry MCP tool when it needs to discover relevant skills or agents.

Registry pipeline:
  -> registry-scanner.mjs discovers skills/agents on filesystem
  -> resource-discovery.mjs handles flat dirs, plugin nesting, loose .md files
  -> registry-indexer.mjs indexes content into FTS5 with metadata
  -> registry-retriever.mjs provides BM25-ranked search with synonym expansion
  -> mem_registry MCP tool exposes search/list/stats/import/remove/reindex actions

Smart invocation (three layers):
  L1 auto-load: UserPromptSubmit matches managed skill name in prompt
     -> Loads content with path="~/.claude-mem-lite/managed/.../SKILL.md"
     -> Guides: Read("path") or mem_use(name="..."), never Skill()
  L2 bridge: PreToolUse hook intercepts Skill("name") for managed resources
     -> Outputs content, prevents native handler failure
  L3 explicit: mem_use(name="...") loads full content with reload path
  Search: managed resources โ†’ Read(path), native plugins โ†’ Skill("full:name")

Composite scoring for search results: BM25 relevance (40%) + repo stars (15%) + success rate (15%) + adoption rate (10%) + freshness (10%) + exploration bonus (10%). Domain filtering ensures platform-specific resources (iOS, Go, Rust) only surface for matching projects.

Episode Encoding

Episodes are batched related operations (edits to the same file group) that get processed by a background LLM worker:

Episode buffer -> Flush to JSON -> claude -p --model haiku -> Structured observation -> SQLite

Each observation includes type, title, narrative, concepts, facts, importance (1-3), and is automatically deduplicated via two tiers: Jaccard similarity (>70% within 5 minutes) and MinHash signatures (>80% within 7 days across sessions). If the LLM call fails, a degraded observation is saved with inferred metadata (zero data loss). Related observations are linked via related_ids based on FTS5 title similarity and file overlap.

Management Commands

# Plugin install:
/plugin install claude-mem-lite       # Install / update
/plugin uninstall claude-mem-lite     # Uninstall

# git clone install:
node install.mjs install              # Install and configure
node install.mjs uninstall            # Remove (keep data)
node install.mjs uninstall --purge    # Remove and delete all data
node install.mjs status               # Show current status
node install.mjs doctor               # Diagnose issues
node install.mjs cleanup-hooks        # Remove only stale claude-mem-lite hooks from settings.json
node install.mjs update               # Force-check for updates and install them (direct install / npx mode)

# npx install:
npx claude-mem-lite                   # Install / reinstall
npx claude-mem-lite uninstall         # Remove (keep data)
npx claude-mem-lite doctor            # Diagnose issues

Notes:

  • Plugin mode only reports available updates; it does not self-update plugin files.
  • Direct install / npx mode keeps auto-update enabled and uses staged replacement with rollback on install failure.
  • If you disabled the plugin but still have old mem hooks in ~/.claude/settings.json, run node install.mjs cleanup-hooks.

doctor

Checks Node.js version, dependencies, server/hook files, database integrity, FTS5 indexes, and stale processes.

status

Shows MCP registration, hook configuration, plugin disabled state, and database stats (observation/session counts).

Uninstall

# Plugin:
/plugin uninstall claude-mem-lite

# git clone:
cd claude-mem-lite
node install.mjs uninstall            # Keeps ~/.claude-mem-lite/ data
node install.mjs uninstall --purge    # Deletes ~/.claude-mem-lite/ and all data

# npx:
npx claude-mem-lite uninstall
npx claude-mem-lite uninstall --purge

Data in ~/.claude-mem-lite/ is preserved by default. Delete manually if needed:

rm -rf ~/.claude-mem-lite/

Project Structure

claude-mem-lite/
  .claude-plugin/
    plugin.json      # Plugin manifest
    marketplace.json # Marketplace catalog
  .mcp.json          # MCP server definition (plugin root)
  hooks/
    hooks.json       # Hook definitions (plugin mode)
  commands/
    mem.md           # /mem command definition
  server.mjs           # MCP server: tool definitions, FTS5 search, database init
  server-internals.mjs # Extracted search helpers: re-ranking, PRF, concept expansion
  hook.mjs             # Claude Code hooks: episode capture, error recall, session management
  hook-llm.mjs         # Background LLM workers: episode extraction, session summaries
  hook-shared.mjs      # Shared hook infrastructure: session management, DB access, LLM calls
  hook-handoff.mjs     # Cross-session handoff: state extraction, intent detection, injection
  hook-context.mjs     # CLAUDE.md context injection and token budgeting
  hook-episode.mjs     # Episode buffer management: atomic writes, pending entry merging
  hook-memory.mjs      # Semantic memory injection on user prompt
  hook-semaphore.mjs   # LLM concurrency control: file-based semaphore for background workers
  schema.mjs           # Database schema: single source of truth for tables, migrations, FTS5
  tool-schemas.mjs     # Shared Zod schemas for MCP tool validation
  tfidf.mjs            # TF-IDF vector engine: tokenization, vocabulary building, vector computation, cosine similarity, RRF merge
  tier.mjs             # Temporal tier system: activity-based time window classification
  utils.mjs            # Re-export hub: backward-compatible surface for all utility modules
  nlp.mjs              # FTS5 query building: synonym expansion, CJK bigrams, sanitization
  scoring-sql.mjs      # BM25 weight constants and type-differentiated decay half-lives
  stop-words.mjs       # Shared base stop-word set for all NLP/search modules
  synonyms.mjs         # Unified synonym source: SYNONYM_MAP (bidirectional) + DISPATCH_SYNONYMS
  project-utils.mjs    # Shared project name resolution with in-process cache
  secret-scrub.mjs     # API key, token, PEM, and credential pattern redaction
  format-utils.mjs     # String formatting: truncate, typeIcon, date/time/week formatting
  hash-utils.mjs       # MinHash signatures, Jaccard similarity for dedup
  bash-utils.mjs       # Bash output significance detection: errors, tests, builds, deploys
  # Resource registry
  registry.mjs         # Resource registry DB: schema, CRUD, FTS5, invocation tracking
  registry-retriever.mjs # FTS5 retrieval with synonym expansion and composite scoring
  registry-indexer.mjs # Resource indexing pipeline
  registry-scanner.mjs # Filesystem scanner: reads content + hashes, delegates discovery
  resource-discovery.mjs # Shared discovery layer: flat dirs, plugin nesting, loose .md files
  haiku-client.mjs     # Unified Haiku LLM wrapper: direct API or CLI fallback
  # Install & config
  install.mjs          # CLI installer: setup, uninstall, status, doctor (npx/git clone mode)
  skill.md             # MCP skill definition (npx/git clone mode)
  package.json         # Dependencies and metadata
  scripts/
    setup.sh           # Setup hook: npm install + migration (hidden dir + old dir)
    post-tool-use.sh   # Bash pre-filter: skips noise in ~5ms, tracks Read paths
    user-prompt-search.js # UserPromptSubmit hook: auto-search memory + L1 skill auto-load
    pre-skill-bridge.js  # PreToolUse hook: L2 skill bridge for managed resources
    pre-tool-recall.js   # PreToolUse hook: file lesson recall before Edit/Write
    prompt-search-utils.mjs # Shared logic: skip patterns, intent detection, name matching
    convert-commands.mjs # Converts command .md โ†’ SKILL.md in managed plugins
    index-managed.mjs  # Offline indexer for managed resources
  # Test & benchmark (dev only)
  tests/               # Unit, property, integration, contract, E2E, pipeline tests
  benchmark/           # BM25 search quality benchmarks + CI gate

Search Quality

Benchmarked on 200 observations across 30 queries (standard + hard-negative categories):

Metric Score
Recall@10 0.88
Precision@10 0.96
nDCG@10 0.95
MRR@10 0.95
P95 search latency 0.15ms

The benchmark suite runs as a CI gate (npm run benchmark:gate) to prevent search quality regressions.

Development

npm run lint              # ESLint static analysis
npm test                  # Run full test suite (vitest)
npm run test:smoke        # Run 5 core smoke tests
npm run test:coverage     # Run tests with V8 coverage (โ‰ฅ75% lines/functions, โ‰ฅ65% branches)
npm run benchmark         # Run full search quality benchmark
npm run benchmark:gate    # CI gate: fails if metrics regress beyond 5% tolerance

Environment Variables

Variable Description Default
CLAUDE_MEM_DIR Custom data directory. All databases, runtime files, and managed resources are stored here. ~/.claude-mem-lite/
CLAUDE_MEM_MODEL LLM model for background calls (episode extraction, session summaries). Accepts haiku or sonnet. haiku
CLAUDE_MEM_DEBUG Enable debug logging (1 to enable). (disabled)

License

MIT

Release History

VersionChangesUrgencyDate
v2.89.0**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.88.0...v2.89.0High6/2/2026
v2.84.2**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.84.1...v2.84.2High5/25/2026
v2.73.2**Fix**: regenerated `package-lock.json` via pinned `npm@10.9.2` to restore `@emnapi/core@1.10.0` + `@emnapi/runtime@1.10.0` top-level entries. CI on v2.73.1 went red at `npm ci` because npm@11's `--package-lock-only` strips top-level transitive deps of platform-optional bindings (`@oxc-parser/binding-wasm32-wasi`, `@rolldown/binding-wasm32-wasi`), and GitHub Actions' bundled npm@10 refuses `npm ci` without them. Same recipe documented in `install.mjs:1704` (previously bit #8271 / 2.58.2 / 2.62.High5/18/2026
v2.73.0# v2.73.0 โ€” 9-round dogfood release End-to-end real-user dogfood pass surfaced 14 distinct issues across CLI, MCP, install, hook, and concurrency surfaces. Mix of **behavior-tightening fixes** (silent fall-throughs that hid typos) and **additive features** (`--json` / `--dry-run` / `--type` on commands users naturally extrapolated from siblings). Net `+583/-78` across 12 files; `+20` tests (2307 โ†’ 2327). Vitest + ESLint green. ## Highlights ### Data-integrity / crash fixes - `update --titleHigh5/13/2026
v2.59.0**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.58.2...v2.59.0High5/8/2026
v2.55.0**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.54.0...v2.55.0High4/29/2026
v2.53.0**CLIโ†”MCP search parity terminator + CLI surface polish.** A QA pass found CLI `search` and MCP `mem_search` returned different ID sets and rankings for the same query โ€” not just presentation differences but actual candidate-set divergence. Root cause: CLI fetched `perSourceLimit = limit` per source while MCP fetched `max(limit*3, offset+limit+10)`, so cross-source merge in CLI mode squeezed observations out of the final top-N when sessions were dense. Plus the two paths had separate inline implHigh4/28/2026
v2.43.0**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.42.0...v2.43.0High4/23/2026
v2.34.4## Fixed CJK-short-prompt recall. The T3 raw-length gate (`PROMPT_MIN_LENGTH=15`) in `scripts/user-prompt-search.js` was a raw-character count while the upstream `shouldSkip` already weighted CJK at 3ร— Latin. A 14-char prompt like `ไผ˜ๅŒ– hook ๆ€ง่ƒฝ้™ไฝŽๅปถ่ฟŸ` (8 CJK + 4 Latin + 2 spaces) passed `shouldSkip`'s 8-unit floor (effectiveLen 30) but fell below the raw-15 gate and never reached FTS. **No breaking changes.** Latin-only prompts keep identical behavior (`computeEffectiveLen` on pure-Latin text equaHigh4/16/2026
v2.34.3UserPromptSubmit FTS recall now drops tangential-keyword noise hits via a top-|rel| sanity gate. 1670 โ†’ 1673 tests green (+3 gate tests, +0.18%). ## Fixed - **`scripts/user-prompt-search.js` top-|rel| sanity gate added (`TOP_REL_FLOOR=50`).** Noise prompts like `today's date please help me`, `what is the current time right now`, `can you please confirm this works okay` surfaced 3โ€“5 tangential memories each via OR-fallback single-stem matches. Empirical 12-prompt probe: SIGNAL top-|rel| 60..133High4/16/2026
v2.34.2Three-round user-perspective audit of all 17 MCP tools (6 core + 11 hidden-but-callable) across MCP stdio and CLI paths. Four concrete issues found and fixed; every fix has a regression test. **1669 โ†’ 1670 tests green.** `git diff --stat`: 10 files, 90+/22-. **No breaking changes.** Timeline scope change is a bug fix โ€” anchor-supplied-then-leaked-cross-project was never an intentional contract. ## Fixed - **`mem_timeline` anchor-based calls no longer bleed cross-project observations.** Both `High4/16/2026
v2.34.1Systematic audit of every user-facing surface in claude-mem-lite โ€” **17 MCP tools + 5 Claude Code hook events + 3 external hook scripts = 25 entrypoints** โ€” with live stdio/CLI reproduction and TDD regression tests. 40 new assertions in `tests/audit-fixes.test.mjs`. Zero regressions. No breaking changes. ## Highlights ### ๐Ÿ”ด P0 (4) โ€” correctness / data safety - **CLI `save --lesson` silently dropped** the lesson. The flag was parsed but never read, and the INSERT omitted `lesson_learned`. UseHigh4/16/2026
v2.34.0**Migration note (user-visible default behavior change).** The MCP server now exposes 6 core tools in `tools/list` (`mem_search`, `mem_recent`, `mem_recall`, `mem_get`, `mem_save`, `mem_timeline`) instead of all 17. The remaining 11 tools (`mem_browse`, `mem_compress`, `mem_delete`, `mem_export`, `mem_fts_check`, `mem_maintain`, `mem_optimize`, `mem_registry`, `mem_stats`, `mem_update`, `mem_use`) stay registered and are still callable by exact name via `tools/call`, so scripts and direct MCP clHigh4/16/2026
v2.33.5Follow-up patch to v2.33.4. Code review of the Stop-schema fix surfaced two Minor items: the PostToolUse receipt path (gated by the new \`RECEIPT_EVENTS\` allowlist) had no positive regression test, and the \`flushEpisode\` header comment carried two contradictory-sounding eras of explanation (v2.33.3 and v2.33.4). Neither is a correctness problem. Both reduce the cost of the next Stop-schema incident should Claude Code ever tighten another event (\`SessionStart\`, etc.). ### Added - \`tests/High4/16/2026
v2.33.4Follow-up to v2.33.3. The v2.33.3 patch taught \`flushEpisode\` to pass \`hookEventName='Stop'\` when called from \`handleStop\`, on the assumption that Claude Code was rejecting the receipt because of an event-name mismatch. That assumption was wrong. Claude Code's Stop-event schema **forbids \`hookSpecificOutput\` entirely** โ€” only \`PreToolUse\` / \`UserPromptSubmit\` / \`PostToolUse\` / \`SessionStart\` carry \`additionalContext\`. So even with the correct event name tag, the receipt JSON sHigh4/16/2026
v2.33.3Hotfix for a regression introduced in v2.33.1 (`cc0bc4d`, structured flush receipt). ## What broke `flushEpisode` in `hook.mjs` wrote its structured receipt with `hookSpecificOutput.hookEventName = 'PostToolUse'` unconditionally. But the function is shared by **three** hook entrypoints: - `handlePostToolUse` (line 271) โ€” expected 'PostToolUse' โœ“ - `handleStop` (line 359) โ€” expected 'Stop' โœ— - `handleSessionStart` leftover-episode flush (line 512) โ€” expected 'SessionStart' โœ— Claude Code validHigh4/16/2026
v2.33.2Hotfix for a regression introduced in `bf121aa` (v2.32.x line, 2026-04-12). ## What broke `handleStop` and `handleSessionStart /clear` switched to `sessionId = ccSessionId || getSessionId()` for parallel-session scoping. But `handleUserPrompt` kept writing `user_prompts` / `sdk_sessions.content_session_id` / `observations.memory_session_id` with the mem-internal id from `getSessionId()`. When Claude Code provided `session_id` in hook stdin (every modern CC session), the id passed to DB lookupsHigh4/16/2026
v2.33.1Audit-driven patch. Four improvements surfaced from a live-session plugin audit (1 PreToolUse Edit hit / 0 follow-up UserPromptSubmit injections / decision 9 vs change 1171 type skew). ## Added - **Follow-up-aware UserPromptSubmit gate** โ€” once a session has injected memory โ‰ฅ1ร—, short continuation prompts ("ๅ‰้ข้‚ฃไธช?", "does it work?") get relaxed thresholds: `PROMPT_MIN_LENGTH` 15โ†’8, `BM25_MIN_SCORE` 1e-5โ†’5e-6. First-prompt behavior unchanged. - **Session-scoped PreToolUse cooldown** โ€” same file High4/16/2026
v2.33.0**Default behavior change** (minor bump): Claude Code plugin installs now auto-adopt the invited-memory sentinel on first SessionStart per project. \`/plugin install claude-mem-lite@sdsrss\` already represents consent to integration โ€” the prior opt-in step was redundant friction. npm/npx CLI users are unaffected and remain opt-in. ## Migration - **Plugin users**: first SessionStart after upgrading silently writes \`<!-- claude-mem-lite:begin v1 -->\` into \`~/.claude/projects/<encoded>/memory/High4/16/2026
v2.32.8Two orthogonal improvements to the UserPromptSubmit auto-search hook. ## Added ### (A) Error-signature precision recall (`scripts/user-prompt-search.js` + `prompt-search-utils.mjs`) New `extractErrorSignature()` extracts typed exception signatures from user prompts: - `TypeError: Cannot read properties of undefined (reading 'foo')` - `ValueError: invalid literal for int()` - `AssertionError: expected 'a' to equal 'b'` - `Error [ERR_MODULE_NOT_FOUND]: ...` (Node idiom) - `thread 'main' panickeHigh4/16/2026
v2.32.7Three coherent tightenings to `detectContinuationIntent` + injection cleanup. Addresses stale-handoff re-injection across new sessions that dogfooding surfaced โ€” `/exit` handoffs (7d lifespan) were re-firing on the first 3 prompts of every new session, and the git-SHA anchor would match indefinitely on HEAD-unchanged repos. ## Fixed - **Stage -1 git_sha anchor age cap (`hook-handoff.mjs:172-191`)** โ€” the anchor previously returned `true` for any matching `git_sha_at_handoff` regardless of age.High4/16/2026
v2.32.6## Fixed When the `UserPromptSubmit` hook surfaced a prior `/exit` handoff as `additionalContext`, the block opened with: ``` <session-handoff source="exit" age="5d"> ## Working On <whatever the prior session was about, often a human-language question> ``` Models sometimes misread the embedded text as a fresh user utterance โ€” ending the turn early, answering the old task, or treating `continue` replies as contradictory. Dogfooding this repo surfaced the pattern three times in one session. `rHigh4/16/2026
v2.32.5End-to-end install/update audit uncovered a cross-module drift between `install.mjs` and `hook-update.mjs`: each maintained an independent `SOURCE_FILES` list, and `hook-update.mjs`'s copy had fallen 8 files behind over v2.31โ€“v2.32. Any npx/npm-installed (non-plugin-mode) user auto-updating from v2.30- to v2.32.x would download the new `hook-llm.mjs` without `lib/activity.mjs` โ†’ `ERR_MODULE_NOT_FOUND` on the next SessionStart. Rolled in: a latent gap where `registry-enricher/-github/-importer.mHigh4/16/2026
v2.32.4**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.32.3...v2.32.4High4/16/2026
v2.32.3Post-ship code-review pass on v2.32.0โ€“v2.32.2 surfaced four issues worth landing. No functional regressions. ## Fixes 1. **180-line budget off-by-one** (`memdir.mjs`) โ€” `split('\\n').length` overcounts by 1 for files ending in a newline (almost always true for markdown). A POSIX-correct 180-line MEMORY.md was being rejected as 181 at the budget edge. Replaced with a newline-counter primitive. Regression tests pin **accept at 180 / reject at 181**. 2. **`removePluginSection` leading whitespaceHigh4/16/2026
v2.32.2Resolves [#14](https://github.com/sdsrss/claude-mem-lite/issues/14). ## Bug \`npm install -g claude-mem-lite\` crashed on first SessionStart with \`ERR_MODULE_NOT_FOUND\` because 10 files imported from user-facing entry points (\`hook.mjs\`, \`server.mjs\`, \`mem-cli.mjs\`, \`install.mjs\`) were missing from the published npm tarball: - \`hook-optimize.mjs\` (the file named in the issue report) - \`plugin-cache-guard.mjs\` - \`lib/activity.mjs\`, \`lib/git-state.mjs\`, \`lib/task-reader.mjs\`High4/16/2026
v2.32.1Audit gate hotfix for the v2.32 line. No functional changes. ## Problem v2.32.0's Release workflow failed at the `npm audit --omit=dev` gate: - `@modelcontextprotocol/sdk@1.26.0` โ†’ `@hono/node-server` โ†’ `hono@4.12.12` - `hono@4.12.12` has [GHSA-458j-xx4x-4375](https://github.com/advisories/GHSA-458j-xx4x-4375) (moderate โ€” improper JSX attribute handling โ†’ HTML injection in SSR) Consequence: v2.32.0's GitHub Release page exists (auto-update path unaffected), but `npm publish` never ran, so theHigh4/16/2026
v2.32.0**Invited-memory** โ€” opt-in mechanism that installs a sentinel-wrapped line into the project's Claude Code memdir (`~/.claude/projects/<encoded>/memory/MEMORY.md`) so plugin MCP-tool triggers load as `user-memory` โ€” higher instruction-following authority than MCP server instructions. Post-adopt the conservative hook layer auto-trims: **MCP instructions 1677 โ†’ 805 bytes (measured)**, SessionStart drops `File Lessons` / `Key Context`, UserPromptSubmit drops the lesson suffix. **Users who never adoHigh4/16/2026
v2.31.2## Auto-upgrade recovery hotfix **Background**: v2.31.1 shipped \`hook.mjs\` with a *static* import of the newly added \`plugin-cache-guard.mjs\`, but \`hook-update.mjs\`'s own \`SOURCE_FILES\` list (what the running update process stages) was not updated. Users auto-upgrading from 2.31.0 received the new \`hook.mjs\` without its dependency โ€” next session-start threw \`ERR_MODULE_NOT_FOUND\` and every mem hook (including the update checker) went silent. ## Fixes - **\`hook.mjs\`** loads \`pluHigh4/14/2026
v2.31.1## Hotfix: duplicate hook firing **Symptom**: every session start / user prompt emitted two copies of `[mem] Related memories` and `<session-handoff>` blocks. **Root cause**: Claude Code runtime reads plugin hooks from `~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/hooks/hooks.json`, not from the marketplace source. `install.mjs` was only clearing the marketplace path, leaving stale cache copies that registered hooks alongside `settings.json` entries written by `install.mjs` โ€” both Medium4/14/2026
v2.31.0## [2.31.0] - 2026-04-14 v2.31 MVP โ€” hook quality hardening + activity namespace + SessionStart dashboard. Ten-task slice distilled from the v3.0 / v3.1 refactor proposals (`docs/plans/2026-04-14-mem-v2.31-mvp.md`), delivered additively with zero breaking changes. Schema bumped 22 โ†’ 25 via three idempotent additive migrations; 1398 โ†’ 1490 tests (+92). ### Added - **Activity namespace** (`events` table + FTS5, T6โ€“T9): non-memdir event types (`bugfix`, `lesson`, `bug`, `discovery`, `refactor`, Medium4/14/2026
v2.30.1**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.30.0...v2.30.1High4/12/2026
v2.30.0**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.29.0...v2.30.0Medium4/11/2026
v2.29.0## Features - **LLM-powered database optimization** (`hook-optimize.mjs`) โ€” intelligent maintenance pipeline with 4 tasks: - **Re-enrich**: Fix degraded observations (missing concepts/facts/lessons) using Haiku - **Normalize**: Unify terminology across observations using Sonnet synonym detection (7-day gate) - **Cluster-merge**: Merge semantically related cross-session observations using Sonnet - **Smart-compress**: Replace bullet-list summaries with intelligent LLM-generated summaries Medium3/30/2026
v2.28.2**Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.28.1...v2.28.2Medium3/29/2026
v2.28.1## What's Changed * feat(invocation): smart skill invocation with path-based guidance by @sdsrss in https://github.com/sdsrss/claude-mem-lite/pull/13 **Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.28.0...v2.28.1Medium3/28/2026
v2.28.0## What's Changed ### Integration Quality Optimization Inspired by code-graph-mcp's approach, optimized the three-layer invocation chain for better Claude Code integration: **MCP Tool Descriptions (Layer 1)** - All 15 MCP tools now have "Use when:" trigger conditions (was 40%, now 100%) - Added 7 decision rules to MCP instructions ("use X instead of Y") **Skill Descriptions (Layer 2)** - All 8 skill commands now have "Use when:" triggers (was 50%, now 100%) **Hook Auto-Invocation (Layer 4Medium3/28/2026
v2.27.0## What's Changed ### Bug Fixes - **Fix false-positive ERROR labeling** in `makeEntryDesc` โ€” weak regex `/error|fail/i` caused vitest test names containing "errorRecall" or text containing "Hispanic" to be falsely labeled as errors. Now uses caller-provided `bashSig.isError` with word-boundary regex `\berror\b|\bfail(ed|ure)?\b|\bexception\b|\bpanic\b` - **buildDegradedTitle**: Strip tab characters and CI status words (`in_progress`, `completed`, etc.) from error hints - **Tier post-filter**: RMedium3/28/2026
v2.26.1## What's New ### Auto-maintain in session-start Memory maintenance (cleanup, decay, boost, idle-mark, purge) now runs automatically during session-start, gated to 24h intervals. No more manual `maintain execute` needed for routine hygiene. - **Cleanup**: removes broken observations (no title/narrative) - **Decay**: reduces importance of old, never-accessed observations - **Idle-mark**: marks stale low-importance entries for future purge - **Boost**: increases importance of frequently-accessedMedium3/27/2026
v2.25.0## PreToolUse File Recall + Actionable Key Context ### New: Just-in-time file lessons before edits - **PreToolUse hook** fires before Edit/Write/NotebookEdit โ€” injects relevant lessons from past observations directly into Claude's context - Queries `observation_files` junction table for high-importance observations (>=2) with `lesson_learned` - 5-minute per-file cooldown prevents duplicate injection during iterative editing - Standalone lightweight script (~30ms) โ€” does not block or delay editsMedium3/25/2026
v2.24.2## macOS Installation Robustness ### Fixes - **Bash 3.2 compatibility**: Replace `mapfile` (bash 4+) with `while read` loop in `setup.sh` โ€” fixes SessionStart hook error on macOS default `/bin/bash` 3.2 - **MCP SDK auto-repair**: `launch.mjs` now verifies `@modelcontextprotocol/sdk` is actually importable before starting the server. Auto-repairs with `npm install --force` if the package is broken (missing `package.json` breaks Node.js subpath exports resolution) - **Doctor enhancement**: `doctoMedium3/25/2026
v2.24.1## Bug Fixes - **Exit codes**: Route 6 not-found cases through `fail()` for proper exit code 1 (`get`, `update`, `delete`, `timeline` with non-existent IDs) - **Importance validation**: `save --importance` now rejects out-of-range values (0, -1, 4+) instead of silently clamping โ€” consistent with `update` behavior - **Tier+limit**: Fix `search --tier X --limit N` returning more results than requested due to expansion bypass - **Browse tier counts**: Exclude compressed/superseded observations froLow3/22/2026
v2.24.0## What's Changed ### Bug Fixes - **Fix negative limit/offset causing unlimited query results** โ€” `recent -5` / `search --limit -1` triggered SQLite `LIMIT -N` which returns all records. Fixed across 5 CLI sites + MCP export schema. - **Fix `compress --age-days 0` silently defaulting** โ€” `0 || 30` evaluator bug replaced with `Number.isFinite()` check. - **Fix export date validation** โ€” Invalid `--from`/`--to` dates now properly rejected with user-friendly messages. ### New Features - **`--sortLow3/22/2026
v2.23.1## Security Hardening & Bug Fixes ### Security - **Command injection prevention**: Replace `execSync` shell pipeline with `execFileSync` in hook-update (tarball download) - **Atomic file writes**: State file updates via tmp+rename to prevent corruption - **Path traversal guard**: Reject plugin archive entries with `..` or absolute paths - **Secret scrub**: Fix regex lookahead ordering for `process.env` exclusion - **Coordination files**: Move from `/tmp` to `RUNTIME_DIR` for proper isolation #Low3/22/2026
v2.23.0## What's New ### New MCP Tools (15 total) - **`mem_recent`** โ€” Show most recent observations ordered by time - **`mem_browse`** โ€” Tier-grouped memory dashboard (working/active/archive) ### Bug Fix - **`mem_browse` ORDER BY** โ€” Inner subquery now includes `created_at_epoch` for correct sort ordering ### CLI-MCP Full Parity - **CLI `search`** โ€” Sessions/prompts cross-source, concept/PRF expansion, vector search + RRF, reRank, superseded marking, tier filtering, cross-source score normalizationLow3/22/2026
v2.22.0## What's New ### Plugin Install Fixes - **Fix: `prompt-search-utils.mjs` not copied during install** โ€” UserPromptSubmit hook was broken for non-dev installs - **Fix: `cli.mjs` missing from auto-update file list** โ€” auto-updates now correctly update the CLI entry point - **Fix: setup.sh no-op stderr redirect** โ€” removed `2>&2` no-op ### Plugin Cache Pruning - Auto-prune old plugin cache versions on update and SessionStart (keeps latest 3) - Reduces disk usage significantly (e.g., 302MB โ†’ 85MB Low3/22/2026
v2.21.0## What's New ### CJK Search Recall Improvement - **Merged CJK dictionary**: `extractCjkKeywords()` uses CJK_COMPOUNDS + SYNONYM_MAP for broader keyword extraction - **CJK stop words**: 50+ particles/fillers filtered from FTS queries (็š„/ไบ†/ๆ˜ฏ/ๅœจ etc.) - **24 new CJKโ†”EN synonym pairs**: ๅ‡ฝๆ•ฐโ†”function, ไผ˜ๅŒ–โ†”optimize, ๆžถๆž„โ†”architecture, ๆไบคโ†”commit, ๅˆๅนถโ†”merge, etc. - **CJK-aware length check**: CJK characters count as 3ร— effective length in `shouldSkip()`, fixing false skips for short CJK queries ### Dev ModLow3/22/2026
v2.20.0## Security & Quality Release ### Critical Fixes - **Security**: Add `scrubSecrets` to `mem_update` handler โ€” prevents API keys/tokens from being persisted via update calls - **Fix**: `reindexKnownResources()` SQL parameter binding error โ€” curated metadata was silently failing to apply during install - **Fix**: 5 runtime modules (`nlp.mjs`, `scoring-sql.mjs`, `stop-words.mjs`, `tier.mjs`, `tfidf.mjs`) missing from `package.json` files list โ€” npm publish would produce broken package ### ImportaLow3/22/2026
v2.19.0## What's New ### P0: Critical Bug Fix - **`mem_save` now writes `observation_files`** โ€” MCP-saved observations now appear in file history recall (`recallForFile`) ### P1: Data Safety - **Atomic `saveObservation`** โ€” observations + observation_files + observation_vectors wrapped in `db.transaction()` for crash safety - **3 new indexes** โ€” `observation_vectors(vocab_version)`, `sdk_sessions(project)`, partial index on uncompressed observations - **Atomic `schema_version`** โ€” DELETE + INSERT wraLow3/22/2026
v2.18.0## Highlights Full architecture audit โ†’ 14 improvements across algorithm quality, performance, rigor, and code quality. ### P0: Algorithm Quality - **TF-IDF vocabulary selection**: Changed from DF-descending (most common) to information-gain (`df ร— idf`) ranking โ€” selects the most discriminative terms, improving vector search quality - **Porter stemmer**: Added to `tokenize()` for ASCII tokens, aligning TF-IDF vocabulary with FTS5's built-in Porter tokenizer - **Sublinear TF**: `1 + log(tf)` dLow3/22/2026
v2.17.1## Hybrid Search & Search Quality Optimization ### New Features - **Hybrid search (FTS5 + TF-IDF vectors)** โ€” Observations are now indexed as 512-dimensional TF-IDF vectors alongside FTS5. Search uses Reciprocal Rank Fusion (RRF) to merge keyword and semantic results. Available in both MCP `mem_search` and CLI `search` commands. - **Persisted vocabulary** โ€” TF-IDF vocabulary stored in `vocab_state` table, preventing vector staleness when document frequencies shift. Vectors stay valid until expLow3/21/2026
v2.17.0## v2.17.0 โ€” Competitive Enhancement Release Three phases of improvements inspired by competitive analysis against industry leaders (Mem0, Graphiti, Hindsight, claude-mem). ### Phase 1: Temporal Fields + Branch Scoping + Access Decay (v2.15.0) - **Temporal validity**: `superseded_at`/`superseded_by` columns โ€” outdated memories automatically excluded from search - **Branch-scoped memory**: `branch` column + `getCurrentBranch()` โ€” filter search by git branch via `mem_search(branch="main")` - **Low3/21/2026
v2.14.0## What's New ### Phase 1: Quick Wins - **FTS5 lesson_learned indexing** โ€” `lesson_learned` field now indexed in FTS5 with weight 8, making past debugging insights directly full-text searchable - **CLAUDE.md Key Context** โ€” `lesson_learned` now shown in Key Context, survives `/compact` - **BM25 constant centralization** โ€” Single source of truth in `utils.mjs`, eliminated 25+ duplicates across 12 files - **Field-aware mem_get truncation** โ€” `narrative` at 1000 chars, `lesson_learned` at 500, othLow3/21/2026
v2.13.1### Added - **37 CLI E2E tests** (`tests/cli-e2e.test.mjs`) โ€” subprocess-level validation of all 8 CLI commands - search: FTS5, type/date/importance filters, OR fallback, lesson display - recent: relative time, count, empty state - recall: file history, lesson, unknown file - get: full details, access_count update, multi-ID, not found - timeline: anchor, query anchor, positional query, access_count, before/after - save: dedup, secret scrubbing, minhash, --type/--title/--importance, iLow3/18/2026
v2.13.0## What's New ### Active CLI + Hook + Skill injection replaces passive MCP dispatch The dispatch system (508 recommendations, 0 adoptions) has been removed and replaced with deterministic, always-firing injection paths: **New CLI commands** (`claude-mem-lite <cmd>`): - `search <query>` โ€” FTS5 search with type-differentiated decay, project boost, access bonus - `recent [N]` โ€” Latest observations with relative timestamps - `recall <file>` โ€” File-centric memory history - `get <ids>` โ€” Full obserLow3/18/2026
v2.12.3## What's Changed * fix(registry): complete resource metadata โ€” 100% field coverage by @sdsrss in https://github.com/sdsrss/claude-mem-lite/pull/6 **Full Changelog**: https://github.com/sdsrss/claude-mem-lite/compare/v2.12.2...v2.12.3Low3/17/2026
v2.12.2## Fixes - **Filter protocol noise**: Skip `<task-notification>` messages in prompt storage โ€” 16% of stored prompts were internal Claude Code protocol XML, not real user input - **Fix scanner disable logic**: Don't disable metadata-imported resources without `local_path` โ€” 134 resources (including commit-commands skills) were incorrectly disabled by filesystem scan - **Fix behavioral adoption window**: `recTime` fallback changed from `0` (Unix epoch) to `null` โ€” invocations without `created_at`Low3/17/2026
v2.12.1## Fixes - **Explicit request bypass**: User requests like "use the playwright skill" now bypass project domain filtering and adoption cooldown โ€” user intent always honored - **Multi-word skill names**: "code review", "ๅ‰็ซฏ่ฎพ่ฎก" etc. now correctly match explicit request patterns - **Debug/debugging synonyms**: Added bidirectional synonym expansion so searching "debugging" finds superpowers-debugging - **Registry search ranking**: Directly invocable resources (with `invocation_name`) now prioritizedLow3/17/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

JobForgeAI-powered job search automation โ€” evaluate offers, generate ATS-optimized CVs, scan portals, negotiate, and track applications. One config drives OpenCode, Cursor, Claude Code, and Codex. Free end-tov2.14.47
gossipcat-aiMulti-agent code review mesh โ€” orchestrates AI agents from multiple providers to review code in parallel, cross-review each other's findings, and build accuracy profiles over time. Agents that catch rv0.5.3
openclaw-codex-agentImplement a contract-first dev workflow that plans, runs, verifies, and fixes code tasks for reproducible, auditable, and verifiable development.main@2026-06-04
ThumbGateSelf-improving agent governance: ๐Ÿ‘/๐Ÿ‘Ž โ†’ Pre-Action Gates that block repeat AI mistakes. Stop paying for the same mistake twice.v1.27.2
contextgitPersistent memory layer for AI agent workflowsmain@2026-06-03

More in MCP Servers

agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.
ProxmoxMCP-PlusEnhanced Proxmox MCP server with advanced virtualization management and full OpenAPI integration.
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.
mcp-compressorAn MCP server wrapper for reducing tokens consumed by MCP tools.