freshcrate
Skin:/
Home > AI Agents > claude-mem

claude-mem

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future ses

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sessions.

README

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ โ€ข ๐Ÿ‡น๐Ÿ‡ผ ็น้ซ”ไธญๆ–‡ โ€ข ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž โ€ข ๐Ÿ‡ต๐Ÿ‡น Portuguรชs โ€ข ๐Ÿ‡ง๐Ÿ‡ท Portuguรชs โ€ข ๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด โ€ข ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol โ€ข ๐Ÿ‡ฉ๐Ÿ‡ช Deutsch โ€ข ๐Ÿ‡ซ๐Ÿ‡ท Franรงais โ€ข ๐Ÿ‡ฎ๐Ÿ‡ฑ ืขื‘ืจื™ืช โ€ข ๐Ÿ‡ธ๐Ÿ‡ฆ ุงู„ุนุฑุจูŠุฉ โ€ข ๐Ÿ‡ท๐Ÿ‡บ ะ ัƒััะบะธะน โ€ข ๐Ÿ‡ต๐Ÿ‡ฑ Polski โ€ข ๐Ÿ‡จ๐Ÿ‡ฟ ฤŒeลกtina โ€ข ๐Ÿ‡ณ๐Ÿ‡ฑ Nederlands โ€ข ๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe โ€ข ๐Ÿ‡บ๐Ÿ‡ฆ ะฃะบั€ะฐั—ะฝััŒะบะฐ โ€ข ๐Ÿ‡ป๐Ÿ‡ณ Tiแบฟng Viแป‡t โ€ข ๐Ÿ‡ต๐Ÿ‡ญ Tagalog โ€ข ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia โ€ข ๐Ÿ‡น๐Ÿ‡ญ เน„เธ—เธข โ€ข ๐Ÿ‡ฎ๐Ÿ‡ณ เคนเคฟเคจเฅเคฆเฅ€ โ€ข ๐Ÿ‡ง๐Ÿ‡ฉ เฆฌเฆพเฆ‚เฆฒเฆพ โ€ข ๐Ÿ‡ต๐Ÿ‡ฐ ุงุฑุฏูˆ โ€ข ๐Ÿ‡ท๐Ÿ‡ด Romรขnฤƒ โ€ข ๐Ÿ‡ธ๐Ÿ‡ช Svenska โ€ข ๐Ÿ‡ฎ๐Ÿ‡น Italiano โ€ข ๐Ÿ‡ฌ๐Ÿ‡ท ฮ•ฮปฮปฮทฮฝฮนฮบฮฌ โ€ข ๐Ÿ‡ญ๐Ÿ‡บ Magyar โ€ข ๐Ÿ‡ซ๐Ÿ‡ฎ Suomi โ€ข ๐Ÿ‡ฉ๐Ÿ‡ฐ Dansk โ€ข ๐Ÿ‡ณ๐Ÿ‡ด Norsk

Persistent memory compression system built for Claude Code.

License Version Node Mentioned in Awesome Claude Code

thedotmack/claude-mem | Trendshift


Claude-Mem Preview Star History Chart

Quick Start โ€ข How It Works โ€ข Search Tools โ€ข Documentation โ€ข Configuration โ€ข Troubleshooting โ€ข License

Claude-Mem seamlessly preserves context across sessions by automatically capturing tool usage observations, generating semantic summaries, and making them available to future sessions. This enables Claude to maintain continuity of knowledge about projects even after sessions end or reconnect.


Quick Start

Install with a single command:

npx claude-mem install

Or install for Gemini CLI (auto-detects ~/.gemini):

npx claude-mem install --ide gemini-cli

Or install for OpenCode:

npx claude-mem install --ide opencode

Or install from the plugin marketplace inside Claude Code:

/plugin marketplace add thedotmack/claude-mem

/plugin install claude-mem

Restart Claude Code or Gemini CLI. Context from previous sessions will automatically appear in new sessions.

Note: Claude-Mem is also published on npm, but npm install -g claude-mem installs the SDK/library only โ€” it does not register the plugin hooks or set up the worker service. Always install via npx claude-mem install or the /plugin commands above.

๐Ÿฆž OpenClaw Gateway

Install claude-mem as a persistent memory plugin on OpenClaw gateways with a single command:

curl -fsSL https://install.cmem.ai/openclaw.sh | bash

The installer handles dependencies, plugin setup, AI provider configuration, worker startup, and optional real-time observation feeds to Telegram, Discord, Slack, and more. See the OpenClaw Integration Guide for details.

Key Features:

  • ๐Ÿง  Persistent Memory - Context survives across sessions
  • ๐Ÿ“Š Progressive Disclosure - Layered memory retrieval with token cost visibility
  • ๐Ÿ” Skill-Based Search - Query your project history with mem-search skill
  • ๐Ÿ–ฅ๏ธ Web Viewer UI - Real-time memory stream at http://localhost:37777
  • ๐Ÿ’ป Claude Desktop Skill - Search memory from Claude Desktop conversations
  • ๐Ÿ”’ Privacy Control - Use <private> tags to exclude sensitive content from storage
  • โš™๏ธ Context Configuration - Fine-grained control over what context gets injected
  • ๐Ÿค– Automatic Operation - No manual intervention required
  • ๐Ÿ”— Citations - Reference past observations with IDs (access via http://localhost:37777/api/observation/{id} or view all in the web viewer at http://localhost:37777)
  • ๐Ÿงช Beta Channel - Try experimental features like Endless Mode via version switching

Documentation

๐Ÿ“š View Full Documentation - Browse on official website

Getting Started

Best Practices

Architecture

Configuration & Development


How It Works

Core Components:

  1. 5 Lifecycle Hooks - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 hook scripts)
  2. Smart Install - Cached dependency checker (pre-hook script, not a lifecycle hook)
  3. Worker Service - HTTP API on port 37777 with web viewer UI and 10 search endpoints, managed by Bun
  4. SQLite Database - Stores sessions, observations, summaries
  5. mem-search Skill - Natural language queries with progressive disclosure
  6. Chroma Vector Database - Hybrid semantic + keyword search for intelligent context retrieval

See Architecture Overview for details.


MCP Search Tools

Claude-Mem provides intelligent memory search through 4 MCP tools following a token-efficient 3-layer workflow pattern:

The 3-Layer Workflow:

  1. search - Get compact index with IDs (~50-100 tokens/result)
  2. timeline - Get chronological context around interesting results
  3. get_observations - Fetch full details ONLY for filtered IDs (~500-1,000 tokens/result)

How It Works:

  • Claude uses MCP tools to search your memory
  • Start with search to get an index of results
  • Use timeline to see what was happening around specific observations
  • Use get_observations to fetch full details for relevant IDs
  • ~10x token savings by filtering before fetching details

Available MCP Tools:

  1. search - Search memory index with full-text queries, filters by type/date/project
  2. timeline - Get chronological context around a specific observation or query
  3. get_observations - Fetch full observation details by IDs (always batch multiple IDs)

Example Usage:

// Step 1: Search for index
search(query="authentication bug", type="bugfix", limit=10)

// Step 2: Review index, identify relevant IDs (e.g., #123, #456)

// Step 3: Fetch full details
get_observations(ids=[123, 456])

See Search Tools Guide for detailed examples.


Beta Features

Claude-Mem offers a beta channel with experimental features like Endless Mode (biomimetic memory architecture for extended sessions). Switch between stable and beta versions from the web viewer UI at http://localhost:37777 โ†’ Settings.

See Beta Features Documentation for details on Endless Mode and how to try it.


System Requirements

  • Node.js: 18.0.0 or higher
  • Claude Code: Latest version with plugin support
  • Bun: JavaScript runtime and process manager (auto-installed if missing)
  • uv: Python package manager for vector search (auto-installed if missing)
  • SQLite 3: For persistent storage (bundled)

Windows Setup Notes

If you see an error like:

npm : The term 'npm' is not recognized as the name of a cmdlet

Make sure Node.js and npm are installed and added to your PATH. Download the latest Node.js installer from https://nodejs.org and restart your terminal after installation.


Configuration

Settings are managed in ~/.claude-mem/settings.json (auto-created with defaults on first run). Configure AI model, worker port, data directory, log level, and context injection settings.

See the Configuration Guide for all available settings and examples.

Mode & Language Configuration

Claude-Mem supports multiple workflow modes and languages via the CLAUDE_MEM_MODE setting.

This option controls both:

  • The workflow behavior (e.g. code, chill, investigation)
  • The language used in generated observations

How to Configure

Edit your settings file at ~/.claude-mem/settings.json:

{
  "CLAUDE_MEM_MODE": "code--zh"
}

Modes are defined in plugin/modes/. To see all available modes locally:

ls ~/.claude/plugins/marketplaces/thedotmack/plugin/modes/

Available Modes

Mode Description
code Default English mode
code--zh Simplified Chinese mode
code--ja Japanese mode

Language-specific modes follow the pattern code--[lang] where [lang] is the ISO 639-1 language code (e.g., zh for Chinese, ja for Japanese, es for Spanish).

Note: code--zh (Simplified Chinese) is already built-in โ€” no additional installation or plugin update is required.

After Changing Mode

Restart Claude Code to apply the new mode configuration.

Development

See the Development Guide for build instructions, testing, and contribution workflow.


Troubleshooting

If experiencing issues, describe the problem to Claude and the troubleshoot skill will automatically diagnose and provide fixes.

See the Troubleshooting Guide for common issues and solutions.


Bug Reports

Create comprehensive bug reports with the automated generator:

cd ~/.claude/plugins/marketplaces/thedotmack
npm run bug-report

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Update documentation
  5. Submit a Pull Request

See Development Guide for contribution workflow.


License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

Copyright (C) 2025 Alex Newman (@thedotmack). All rights reserved.

See the LICENSE file for full details.

What This Means:

  • You can use, modify, and distribute this software freely
  • If you modify and deploy on a network server, you must make your source code available
  • Derivative works must also be licensed under AGPL-3.0
  • There is NO WARRANTY for this software

Note on Ragtime: The ragtime/ directory is licensed separately under the PolyForm Noncommercial License 1.0.0. See ragtime/LICENSE for details.


Support


Built with Claude Agent SDK | Powered by Claude Code | Made with TypeScript


What About $CMEM?

$CMEM is a solana token created by a 3rd party without Claude-Mem's prior consent, but officially embraced by the creator of Claude-Mem (Alex Newman, @thedotmack). The token acts as a community catalyst for growth and a vehicle for bringing real-time agent data to the developers and knowledge workers that need it most. $CMEM: 2TsmuYUrsctE57VLckZBYEEzdokUF8j8e1GavekWBAGS

Release History

VersionChangesUrgencyDate
v13.4.0## v13.4.0 โ€” Defect backlog clearance + provider extensibility Clears a large defect backlog (plans 01โ€“11 plus standalone fixes) and adds provider configurability. Test suite moved 46 โ†’ 0 failing and typecheck 24 โ†’ 0 errors over the branch. ### Features - **Configurable OpenAI-compatible base URL** for the OpenRouter provider (`CLAUDE_MEM_OPENROUTER_BASE_URL`) โ€” point claude-mem at DeepSeek, LM Studio, or any custom OpenAI-compatible endpoint. ### Fixes (highlights) - **Spawn contract (plan-0High5/29/2026
v13.3.0## What's New ### New skills - **design-is** (#2483) โ€” audits a design against Dieter Rams' ten "Good design is..." principles. Produces per-principle 0โ€“3 scores with file:line evidence and a NEW / REFINE / REDESIGN verdict, then hands off a ready-to-run `/make-plan` prompt. - **weekly-digests** (#2399) โ€” produces a chapter-per-ISO-week serial digest of a project's full claude-mem timeline. Sequential subagent pipeline keeps the narrative coherent across 30+ chapters. - **oh-my-issues** (#2409High5/21/2026
v13.2.0## What's new ### `wowerpoint` skill โ€” kawaii NotebookLM slide-deck generator Turn one source document into a kawaii NotebookLM slide-deck PDF. Wraps the `notebooklm` CLI with the kawaii-prompt + `--format detailed` defaults and a spawn-subagent pattern so generation (~10 min) never blocks the main conversation. - **Single-source-per-deck** is enforced by the workflow shape: confirm or write the source doc *before* adding it to NotebookLM. Don't paper over a weak source by stacking more sourcHigh5/12/2026
v13.0.0## Highlights This is the **claude-mem 13** major release, landing the Server Beta runtime and the project's relicense. ### Server Beta runtime (opt-in) - Independent server-beta service with its own lifecycle (`claude-mem server start/status/stop`) - Postgres-backed observation storage - BullMQ + Redis observation queue engine (gated behind `CLAUDE_MEM_QUEUE_ENGINE=bullmq`, fail-fast) - New `/v1` REST API surface (events, sessions, memories, search, context, audit, jobs) - API-key auth + BettHigh5/8/2026
v12.5.0## Highlights **Observation pipeline cleanup โ€” kill the per-message retry counter.** The AI's parseable response is the only success signal; any other response (unparseable, empty, transport error) is a no-op. No more silent data loss after 3 retries. ## What changed - **Parser:** collapsed to binary `{ valid: true, observations, summary } | { valid: false }`. No more `kind`/`skipped` enum dispatch in callers. - **ResponseProcessor:** two branches only โ€” parseable โ†’ store + clear pending โ†’ brHigh5/2/2026
v12.4.8## Bug Fixes - **timeline tool:** Coerce stringified numeric anchors (e.g. `"123"`) into the observation-ID dispatch path so they no longer fall through to ISO-timestamp parsing and return wrong-epoch windows. The HTTP layer always sends anchor as a string, so this fixes anchor lookups via MCP and HTTP across the board. (#2176) ## Tests - Added a 7-case regression suite covering JS-number anchors, stringified-number anchors (incl. whitespace-padded), session-ID anchors (`S<n>`), ISO-timestampHigh4/28/2026
v12.3.9## Highlights ### ๐Ÿ” Security observation types + Telegram notifier - New observation types: `security_alert` ๐Ÿšจ (high-priority, triggers notifications) and `security_note` ๐Ÿ” (low-priority). - Fire-and-forget Telegram notifier โ€” MarkdownV2 formatting, per-observation error isolation, no token logging. - Five env vars control behavior. `CLAUDE_MEM_TELEGRAM_ENABLED` master toggle defaults on (no-op without bot token + chat ID). ### โšก Stop hook: fire-and-forget summarize - Eliminated the ~110s tHigh4/22/2026
v12.3.8## ๐Ÿ”ง Fix **Detect PID reuse in the worker start-guard so containers can restart cleanly.** (#2082) The `kill(pid, 0)` liveness check false-positived when the worker's PID file outlived its PID namespace โ€” most commonly after `docker stop` / `docker start` with a bind-mounted `~/.claude-mem`. The new worker would boot as the same low PID (often 11) as the old one, `kill(0)` would report "alive," and the worker would refuse to start *against its own prior incarnation*. Symptom: container appearHigh4/21/2026
v12.3.7## What's Changed **Refactor: remove bearer auth and platform_source context filter** (#2081) - Drop bearer-token auth from the worker API. Worker binds localhost-only and CORS restricts origins to localhost โ€” the token added friction for every internal client (hooks, CLI, viewer, sync script) with no real security benefit for single-user local deployments. - Drop the unused `platform_source` query-time filter from the `/api/context/inject` pipeline (ContextBuilder, ObservationCompiler, SearchHigh4/20/2026
v12.3.6## Viewer fix: drop the rate limiter v12.3.5 kept the 300 req/min rate limiter from v12.3.3's "security hardening" bundle. That tripped the live viewer within seconds (it polls logs and stats) and served it "Rate limit exceeded" errors. **Fix**: remove the rate limiter entirely. The worker is localhost-only (enforced via CORS), so there's no abuse surface to protect. Rate-limiting a single-user local process is security theater. ### Still kept from v12.3.3 hardening - 5 MB JSON body limit - PHigh4/20/2026
v12.3.5## Restored v12.3.3 fixes minus bearer auth v12.3.3 shipped 25 bug fixes under "Issue Blowout 2026" but also introduced bearer-token auth that broke SessionStart context injection for everyone. v12.3.4 rolled everything back to v12.3.2 to unblock users. **v12.3.5 restores all 25 fixes**, with the bearer-auth mechanism surgically removed. ### Kept hardening from v12.3.3 - 5 MB JSON body limit - In-memory rate limiter (300 req/min/IP) - Path traversal protection on `watch.context.path` - `RestaHigh4/20/2026
v12.3.4## Rollback of v12.3.3 v12.3.3 (Issue Blowout 2026, PR #2080) broke SessionStart context injection โ€” new sessions received no memory context from claude-mem. This release reverts to the v12.3.2 tree state while the regression is investigated. ### Reverted - #2080 โ€” Issue Blowout 2026 (25 bugs across worker, hooks, security, and search) ### Notes No functional changes from v12.3.2. A follow-up release will re-land the v12.3.3 fixes individually once the context regression is identified and resHigh4/20/2026
v12.3.3## Issue Blowout 2026 โ€” 25 bugs across worker, hooks, security, and search ### Security Hardening - Bearer token authentication for all worker API endpoints with auto-generated tokens - Path traversal protection on context write paths - Per-user worker port derivation (37700 + uid%100) to prevent cross-user data leakage - Rate limiting (300 req/min/IP) and reduced JSON body limit (50MB โ†’ 5MB) - Caller headers can no longer override the bearer auth token ### Worker Stability - Time-windowed ResHigh4/20/2026
v12.3.2## Bug Fixes - **Search**: Fix `concept`/`concepts` parameter mismatch in `/api/search/by-concept` (#1916) - **Search**: Add FTS5 keyword fallback when ChromaDB is unavailable (#1913, #2048) - **Database**: Add periodic `clearFailed()` to purge stale pending messages (#1957) - **Database**: Add WAL checkpoint schedule and `journal_size_limit` to prevent unbounded growth (#1956) - **Worker**: Mark messages as failed (with retry) instead of confirming on non-XML responses (#1874) - **Worker**: InHigh4/20/2026
v12.3.1## Error Handling & Code Quality This patch release resolves error handling anti-patterns across the entire codebase (91 files), improving resilience and correctness. ### Bug Fixes - **OpenRouterAgent**: Restored assistant replies to `conversationHistory` โ€” multi-turn context was lost after method extraction (#2078) - **ChromaSync**: Fixed cross-type dedup collision where `observation#N`, `session_summary#N`, and `user_prompt#N` could silently drop results - **Timeline queries**: Fixed loggerHigh4/20/2026
v12.3.0## New features ### Basic claude-mem Docker container (`docker/claude-mem/`) A ready-to-run container for ad-hoc claude-mem testing with zero local setup beyond Docker. - `FROM node:20`; layers pinned Bun (1.3.12) + uv (0.11.7) + the built plugin - Non-root `node` user so `--permission-mode bypassPermissions` works headlessly - `build.sh`, `run.sh` (auto-extracts OAuth from macOS Keychain or `~/.claude/.credentials.json`, falls back to `ANTHROPIC_API_KEY`), `entrypoint.sh` - Persistent `.claudHigh4/20/2026
v12.2.3## Fixed - **Parser: stop warning on normal observation responses (#2074).** Eliminated the `PARSER Summary response contained <observation> tags instead of <summary> โ€” prompt conditioning may need strengthening` warning that fired on every normal observation turn. The warning was inherited from #1345 when `parseSummary` was only called after summary prompts; after #1633's refactor it runs on every response, so the observation-only fallthrough always tripped. Gated the entire observation-on-sumHigh4/19/2026
v12.2.2## Subagent summary disable + labeling Claude Code subagents (the Task tool and built-in agents like Explore/Plan/Bash) no longer trigger a session summary on Stop, and every observation row now carries the originating subagent's identity. ### Features - **Subagent Stop hooks skip summarization.** When a hook fires inside a subagent (identified by `agent_id` on stdin), the handler short-circuits before bootstrapping the worker. Only the main assistant owns the session summary. Sessions starteHigh4/19/2026
v12.2.1## What's Fixed ### Break infinite summary-retry loop (#1633) When the summary agent returned `<observation>` tags instead of `<summary>` tags, the parser rejected the response, no summary was stored, the session completed without a summary, and a new session was spawned with ~5โ€“6 KB of extra prompt context โ€” repeating indefinitely. **Three layers of defense (PR #2072):** - **Parser coercion** โ€” when a summary is expected, observation fields are mapped to summary fields (title โ†’ request/compHigh4/19/2026
v12.2.0## Highlights **Worktree Adoption** โ€” When a git worktree is merged back into its parent branch, its observations are now consolidated into the parent project's view, so memory follows the code after a merge. ## Features - **Worktree adoption engine** โ€” consolidates merged-worktree observations under the parent project (#2052) - **`npx claude-mem adopt`** โ€” new CLI command with `--dry-run` and `--branch X` flags for manual adoption - **Auto-adoption on worker startup** โ€” merged worktrees are High4/18/2026
v12.1.6## Fix **Critical regression fix (#2049): observations no longer save on Claude Code 2.1.109+** Resolves 100% observation/summary failure on Claude Code 2.1.109+ caused by a latent bug in how the bundled Agent SDK emits the `--setting-sources` flag. ### Root cause The Agent SDK emits `["--setting-sources", ""]` whenever `settingSources` defaults to `[]`. Our existing Bun-compat filter stripped the empty string but left an orphan `--setting-sources` flag, which then consumed the following `--High4/16/2026
v12.1.5## v12.1.5 โ€” Forced update to ship --setting-sources fix Users on v12.1.3 experience 100% observation failure due to empty-string arg filtering corrupting `--setting-sources` on Claude Code 2.1.109+. The fix already landed in v12.1.4 (commit 3d92684 โ€” `fix: filter empty string args before Bun spawn()`). This release forces the update to propagate across npm and the marketplace so every user gets the fix. ## Backlog cleanup Also shipped earlier today: the April 2026 backlog consolidation mergedHigh4/15/2026
v12.1.4## Bug Fixes - **Revert unauthorized $CMEM branding**: A prior Claude instance inserted `$CMEM` token branding into the context injection header during a compression refactor. Reverted back to the original descriptive format: `# [project] recent context, datetime`High4/15/2026
v12.1.3## What's Changed ### Reverted - **Remove overengineered summary salvage logic** (#1850) โ€” Reverts PR #1718 which fabricated synthetic summaries from observation data when the AI returned `<observation>` instead of `<summary>` tags. Missing a summary is preferable to creating a fake one with poorly-mapped fields. **Full Changelog**: https://github.com/thedotmack/claude-mem/compare/v12.1.2...v12.1.3High4/15/2026
v12.1.2## Community PRs merged (15) **Runtime & reliability** - #1698 Reap stuck generators in reapStaleSessions (@ousamabenyounes) - #1697 Circuit breaker on OpenClaw worker client (@ousamabenyounes) - #1696 Resolve Setup hook reference, warn on macOS-only binary (@ousamabenyounes) - #1693 Session lifecycle guards to prevent runaway API spend (@ousamabenyounes) - #1692 Resolve Gemini CLI 0.37.0 session capture failures (@ousamabenyounes) **Cross-platform & hooks** - #1833 Replace hardcoded nvm/homebHigh4/15/2026
v12.1.1## v12.1.1 โ€” Backlog Burn-Down Patch 14 community PRs merged + 1 post-merge bug fix. This patch addresses the most impactful bugs across summary persistence, MCP compliance, cross-platform compatibility, and data integrity. ### Highlights **Summary pipeline fix** โ€” When the LLM returns `<observation>` tags instead of `<summary>` tags (~72% of the time on v12.0.x), data is now salvaged into a synthetic summary instead of being silently discarded. (#1718) **MCP compliance** โ€” `list_corpora` noHigh4/15/2026
v12.1.0## Knowledge Agents Build queryable AI "brains" from your claude-mem observation history. Compile a filtered slice of your past work into a corpus, prime it into a Claude session, and ask questions conversationally โ€” getting synthesized, grounded answers instead of raw search results. ### New Features - **Knowledge Agent system** โ€” full lifecycle: build, prime, query, reprime, rebuild, delete - **6 new MCP tools**: `build_corpus`, `list_corpora`, `prime_corpus`, `query_corpus`, `rebuild_corpuHigh4/9/2026
v12.0.1## ๐Ÿ”ด Hotfix: MCP server crashed with `Cannot find module 'bun:sqlite'` under Node v12.0.0 shipped a broken MCP server bundle that crashed on the very first `require()` call because a transitive import pulled `bun:sqlite` (a Bun-only module) into a bundle that runs under Node. Every MCP-only client (Codex and any flow that boots the MCP tool surface) was completely broken on v12.0.0. ### Root cause `src/servers/mcp-server.ts` imported `ensureWorkerStarted` from `worker-service.ts`, which tranMedium4/8/2026
v12.0.0# claude-mem v12.0.0 A major release delivering intelligent file-read gating, expanded language support for smart-explore, platform source isolation, and 40+ bug fixes across Windows, Linux, and macOS. ## Highlights ### File-Read Decision Gate Claude Code now intelligently gates redundant file reads. When a file has prior observations in the timeline, the PreToolUse hook injects the observation history and blocks the read โ€” saving tokens and keeping context focused. The gate supports both `ReMedium4/7/2026
v11.0.1## v11.0.1 โ€” Disable Semantic Inject by Default **Patch release** โ€” Changes `CLAUDE_MEM_SEMANTIC_INJECT` default from `true` to `false`. ### What changed - Per-prompt Chroma vector search on `UserPromptSubmit` is now **opt-in** rather than opt-out - Reduces latency and context noise for users who haven't explicitly enabled it - Users can re-enable via `CLAUDE_MEM_SEMANTIC_INJECT=true` in `~/.claude-mem/settings.json` ### Why The semantic inject fires on every prompt and often surfaces tangentMedium4/6/2026
v11.0.0## claude-mem v11.0.0 **4 releases today** ยท 21 commits ยท 6,051 insertions ยท 34 files changed ### Features #### Semantic Context Injection (#1568) Every `UserPromptSubmit` now queries ChromaDB for the top-N most relevant past observations and injects them as context. Replaces recency-based "last N observations" with relevance-based semantic search. Survives `/clear`, skips trivial prompts (<20 chars), and degrades gracefully when Chroma is unavailable. #### Tier Routing by Queue Complexity TMedium4/5/2026
v10.7.2## Bug Fix - **fix**: Downgrade concept-type cleanup log from error to debug (#1606) โ€” reduces noise in logs by treating routine concept-type cleanup as debug-level rather than error-level logging.Medium4/5/2026
v10.7.1## Bug Fix **Restore full interactive installer** โ€” the install simplification in v10.7.0 (commit 21b10b46) over-applied scope and replaced the entire `runInstallCommand` with just two `claude` CLI commands. This gutted the interactive IDE multi-select, `--ide` flag, and all 13 IDE-specific setup dispatchers. ### What changed - **Claude Code**: now uses native `claude plugin marketplace add` + `claude plugin install` (the intended simplification) - **All other IDEs** (Gemini CLI, OpenCode, WinMedium4/5/2026
v10.7.0## What's New ### Simplified Installation - Install command now delegates to native Claude Code plugin system: `claude plugin marketplace add thedotmack/claude-mem && claude plugin install claude-mem` - Reduced install.ts from 536 lines to 36 lines ### Multi-IDE Support (NPX CLI) - Gemini CLI hooks installer with lifecycle event mapping - Windsurf hooks installer with project registry and context injection - OpenCode plugin installer with AGENTS.md context injection - OpenClaw plugin installerMedium4/4/2026
v10.6.3## v10.6.3 โ€” Critical Patch Release ### Bug Fixes - **Fix MCP server crash**: Removed erroneous `import.meta.url` ESM-compat banner from CJS files that caused Node.js startup failures - **Fix 7 critical bugs** affecting all non-dev-machine users and Windows: - Hook registration paths corrected for plugin distribution - Worker service spawn handling hardened for Windows - Environment sanitization for cross-platform compatibility - ProcessManager Windows spawn catch block improvements Medium3/29/2026
v10.6.2## fix: Activity spinner stuck spinning forever The viewer UI activity spinner would spin indefinitely because `isAnySessionProcessing()` queried all pending/processing messages in the database globally โ€” including orphaned messages from dead sessions that no generator would ever process. These orphans caused `isProcessing=true` forever. ### Changes - Scoped `isAnySessionProcessing()` and `hasPendingMessages()` to only check sessions in the active in-memory Map, so orphaned DB messages no lonLow3/21/2026
v10.6.1### New Features - **Timeline Report Skill** โ€” New `/timeline-report` skill generates narrative "Journey Into [Project]" reports from claude-mem's development history with token-aware economics - **Git Worktree Detection** โ€” Timeline report automatically detects git worktrees and uses parent project as data source - **Compressed Context Output** โ€” Markdown context injection compressed ~53% (tables โ†’ compact flat lines), reducing token overhead in session starts - **Full Observation Fetch** โ€” AddLow3/18/2026
v10.6.0## OpenClaw: System prompt context injection The OpenClaw plugin no longer writes to `MEMORY.md`. Instead, it injects the observation timeline into each agent's system prompt via the `before_prompt_build` hook using `appendSystemContext`. This keeps `MEMORY.md` under the agent's control for curated long-term memory. Context is cached for 60 seconds per project. ## New `syncMemoryFileExclude` config Exclude specific agent IDs from automatic context injection (e.g., `["snarf", "debugger"]`). ObLow3/18/2026
v10.5.6## Patch: Process Supervisor Hardening & Logging Cleanup ### Fixes - **Downgrade HTTP request/response logging from INFO to DEBUG** โ€” eliminates noisy per-request log spam from the viewer UI polling - **Fix `isPidAlive(0)` returning true** โ€” PID 0 is the kernel scheduler, not a valid child process - **Fix signal handler race condition** โ€” added `shutdownInitiated` flag to prevent duplicate shutdown cascades when signals arrive before `stopPromise` is set - **Remove unused `dataDir` parameter** Low3/16/2026
v10.5.5### Bug Fix - **Fixed empty context queries after mode switching**: Switching from a non-code mode (e.g., law-study) back to code mode left stale observation type/concept filters in `settings.json`, causing all context queries to return empty results. All modes now read types/concepts from their mode JSON definition uniformly. ### Cleanup - Removed dead `CLAUDE_MEM_CONTEXT_OBSERVATION_TYPES` and `CLAUDE_MEM_CONTEXT_OBSERVATION_CONCEPTS` settings constants - Deleted `src/constants/observation-Low3/9/2026
v10.5.4## Bug Fixes - **fix: restore modes to correct location** โ€” All modes (`code`, code language variants, `email-investigation`) were erroneously moved from `plugin/modes/` to `plugin/hooks/modes/` during the v10.5.3 release, breaking mode loading. This patch restores them to `plugin/modes/` where they belong.Low3/9/2026
v10.5.3## What's New ### Law Study Mode Adds `law-study` โ€” a purpose-built claude-mem mode for law students. **Observation Types:** - **Case Holding** โ€” 2-3 sentence brief with extracted legal rule - **Issue Pattern** โ€” exam trigger or fact pattern that signals a legal issue - **Prof Framework** โ€” professor's analytical lens and emphasis for a topic - **Doctrine / Rule** โ€” legal test or standard synthesized from cases/statutes - **Argument Structure** โ€” legal argument or counter-argument worked throLow3/9/2026
v10.5.2## Smart Explore Benchmark Docs & Skill Update ### Documentation - Published smart-explore benchmark report to public docs โ€” full A/B comparison with methodology, raw data tables, quality assessment, and decision framework - Added benchmark report to docs.json navigation under Best Practices ### Smart Explore Skill - Updated token economics with benchmark-accurate data (11-18x savings on exploration, 4-8x on file understanding) - Added "map first" core principle as decision heuristic for tool Low2/26/2026
v10.5.1### Bug Fix - Restored hooks.json to pre-smart-explore configuration (re-adds Setup hook, separate worker start command, PostToolUse matcher)Low2/26/2026
v10.5.0## Smart Explore: AST-Powered Code Navigation This release introduces **Smart Explore**, a token-optimized structural code search system built on tree-sitter AST parsing. It applies the same progressive disclosure pattern used in human-readable code outlines โ€” but programmatically, for AI agents. ### Why This Matters The standard exploration cycle (Glob โ†’ Grep โ†’ Read) forces agents to consume entire files to understand code structure. A typical 800-line file costs ~12,000 tokens to read. SmarLow2/26/2026
v10.4.4## Fix - **Remove `save_observation` from MCP tool surface** โ€” This tool was exposed as an MCP tool available to Claude, but it's an internal API-only feature. Removing it from the MCP server prevents unintended tool invocation and keeps the tool surface clean.Low2/26/2026
v10.4.3## Bug Fixes - **Fix PostToolUse hook crashes and 5-second latency (#1220)**: Added missing `break` statements to all 7 switch cases in `worker-service.ts` preventing fall-through execution, added `.catch()` on `main()` to handle unhandled promise rejections, and removed redundant `start` commands from hook groups that triggered the 5-second `collectStdin()` timeout - **Fix CLAUDE_PLUGIN_ROOT fallback for Stop hooks (#1215)**: Added POSIX shell-level `CLAUDE_PLUGIN_ROOT` fallback in `hooks.jsonLow2/25/2026
v10.4.2## Bug Fixes - **Fix PostToolUse hook crashes and 5-second latency (#1220)**: Added missing `break` statements to all 7 switch cases in `worker-service.ts` preventing fall-through execution, added `.catch()` on `main()` to handle unhandled promise rejections, and removed redundant `start` commands from hook groups that triggered the 5-second `collectStdin()` timeout - **Fix CLAUDE_PLUGIN_ROOT fallback for Stop hooks (#1215)**: Added POSIX shell-level `CLAUDE_PLUGIN_ROOT` fallback in `hooks.jsonLow2/25/2026
v10.4.1### Refactor - **Skills Conversion**: Converted `/make-plan` and `/do` commands into first-class skills in `plugin/skills/`. - **Organization**: Centralized planning and execution instructions alongside `mem-search`. - **Compatibility**: Added symlinks for `openclaw/skills/` to ensure seamless integration with OpenClaw. ### Chore - **Version Bump**: Aligned all package and plugin manifests to v10.4.1.Low2/24/2026
v10.4.0## v10.4.0 โ€” Stability & Platform Hardening Massive reliability release: 30+ root-cause bug fixes across 10 triage phases, plus new features for agent attribution, Chroma control, and broader platform support. ### New Features - **Session custom titles** โ€” Agents can now set `custom_title` on sessions for attribution (migration 23, new endpoint) - **Chroma toggle** โ€” `CLAUDE_MEM_CHROMA_ENABLED` setting allows SQLite-only fallback mode (#707) - **Plugin disabled state** โ€” Early exit check in aLow2/24/2026
v10.3.3### Bug Fixes - Fixed session context footer to reference the claude-mem skill instead of MCP search tools for accessing memoriesLow2/23/2026
v10.3.2## Bug Fixes - **Worker startup readiness**: Worker startup hook now waits for full DB/search readiness before proceeding, fixing the race condition where hooks would fire before the worker was initialized on first start (#1210) - **MCP tool naming**: Renamed `save_memory` to `save_observation` for consistency with the observation-based data model (#1210) - **MCP search instructions**: Updated MCP server tool descriptions to accurately reflect the 3-layer search workflow (#1210) - **Installer hLow2/23/2026
v10.3.1## Fix: Prevent Duplicate Worker Daemons and Zombie Processes Three root causes of chroma-mcp timeouts identified and fixed: ### PID-based daemon guard Exit immediately on startup if PID file points to a live process. Prevents the race condition where hooks firing simultaneously could start multiple daemons before either wrote a PID file. ### Port-based daemon guard Exit if port 37777 is already bound โ€” runs before WorkerService constructor registers keepalive signal handlers that previously Low2/19/2026
v10.3.0## Replace WASM Embeddings with Persistent chroma-mcp MCP Connection ### Highlights - **New: ChromaMcpManager** โ€” Singleton stdio MCP client communicating with chroma-mcp via `uvx`, replacing the previous ChromaServerManager (`npx chroma run` + `chromadb` npm + ONNX/WASM) - **Eliminates native binary issues** โ€” No more segfaults, WASM embedding failures, or cross-platform install headaches - **Graceful subprocess lifecycle** โ€” Wired into GracefulShutdown for clean teardown; zombie process prevLow2/18/2026
v10.2.6## Bug Fixes ### Zombie Process Prevention (#1168, #1175) Observer Claude CLI subprocesses were accumulating as zombies โ€” processes that never exited after their session ended, causing massive resource leaks on long-running systems. **Root cause:** When observer sessions ended (via idle timeout, abort, or error), the spawned Claude CLI subprocesses were not being reliably killed. The existing `ensureProcessExit()` in `SDKAgent` only covered the happy path; sessions terminated through `SessionLow2/18/2026
v10.2.5### Bug Fixes - **Self-healing message queue**: Renamed `claimAndDelete` โ†’ `claimNextMessage` with atomic self-healing โ€” automatically resets stale processing messages (>60s) back to pending before claiming, eliminating stuck messages from generator crashes without external timers - **Removed redundant idle-timeout reset**: The `resetStaleProcessingMessages()` call during idle timeout in worker-service was removed (startup reset kept), since the atomic self-healing in `claimNextMessage` now hanLow2/18/2026
v10.2.4## Chroma Vector DB Backfill Fix Fixes the Chroma backfill system to correctly sync all SQLite observations into the vector database on worker startup. ### Bug Fixes - **Backfill all projects on startup** โ€” `backfillAllProjects()` now runs on worker startup, iterating all projects in SQLite and syncing missing observations to Chroma. Previously `ensureBackfilled()` existed but was never called, leaving Chroma with incomplete data after cache clears. - **Fixed critical collection routing bug*Low2/18/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

mem9Enable AI agents to retain memory across sessions using persistent storage designed for continuous context retention.main@2026-06-05
c4-genai-suitec4 GenAI Suitev9.19.4
simBuild, deploy, and orchestrate AI agents. Sim is the central intelligence layer for your AI workforce.v0.6.103
hermes-agentThe agent that grows with youv2026.6.5
MiniSearchMinimalist web-searching platform with an AI assistant that runs directly from your browser. Uses WebLLM, Wllama and SearXNG. Demo: https://felladrin-minisearch.hf.spacemain@2026-06-05

More in AI Agents

hermes-agentThe agent that grows with you
awesome-copilotCommunity-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.
CopilotKitThe Frontend Stack for Agents & Generative UI. React + Angular. Makers of the AG-UI Protocol
e2bE2B SDK that give agents cloud environments