Standard research · Fresh sources
Claude-Mem
Completed June 23, 2026
Claude-Mem: Synthesized Research Summary
Date of synthesis: Late 2025 / Early 2026 Source preference: Fresh — prioritizes 2026 data over earlier claims
---
Executive Summary
Claude-Mem (creator: Alex Newman / @thedotmack) is an open-source persistent memory plugin for Claude Code. It captures, compresses, and reinjects context across sessions, claiming dramatic token cost savings (up to 95% fewer tokens). At v13.1.0 (2026) with ~74,800 GitHub stars, it is the most popular solution in its category.
However, the research reveals severe unresolved issues:
- A memory leak causing 50+ GB RAM consumption after ~989 sessions (Issue #789, open)
- Critical security vulnerabilities – unauthenticated local HTTP API, cleartext API key exposure, path traversal (Issue #1251, open)
- No independent validation of token savings claims (all figures self-reported or promotional)
These findings only appear in Agent 4 (performance/reliability); the other agents treat it as “production-ready,” creating a dangerous blind spot.
Bottom line: Claude-Mem is powerful but not production-safe without mitigation. Use it for personal projects with vigilance; avoid in team/enterprise settings until critical bugs are fixed.
---
Product Overview & Feature Comparison
Updated from the most recent data (v13.1.0, 2026). Earlier claims (v12, 65.8K stars) are superseded.
| Capability | Claude-Mem | Claude Official Memory | Context Mode | Memsearch (Zilliz/Milvus) |
|---|---|---|---|---|
| Cross-session persistence | ✅ Core feature | ❌ Single-session only | ❌ In-session context rot | ✅ Cross-session |
| Auto-capture (hooks) | ✅ Automatic via lifecycle hooks | ❌ Manual invocations | ❌ Manual | ✅ Partial hooks |
| Semantic/vector search | ✅ ChromaDB + SQLite FTS5 | ❌ | ❌ | ✅ Milvus-backed |
| Folder context files | ✅ Auto-generates CLAUDE.md | ❌ | ❌ | ❌ |
| Context compression | ✅ Claims 10×–20× reduction | ❌ Full context | ✅ Within session | ✅ |
| Editable memory | ✅ SQLite DB (manual) | ✅ User visible | ✅ | ✅ Markdown files |
| Agent-agnostic | ⚠️ Primarily Claude Code; Gemini, Codex, Copilot support exists but documented "thinner" per Agent 2 | ❌ Claude-only | ❌ Claude Code only | ✅ Claude Code, Codex CLI, OpenClaw, OpenCode |
| Install method | npx claude-mem install | Built-in | Plugin marketplace | git clone + install |
| Persistence backend | SQLite + ChromaDB (local) | Managed by Anthropic | Claude Code context | Milvus + Markdown |
| Security posture | ❌ Critical unresolved vulnerabilities | Good (Anthropic-managed) | Good | Unknown |
Source notes:
- Primary:
docs.claude-mem.ai/architecture/*(2026, undated but v13+ content) - Star/version data: GitHub releases & Agent 4 (2026) – v13.1.0, 74.8K stars
- Comparison data: MindStudio (2025), Milvus blog (2025), Reddit r/ClaudeAI (July–Sept 2025)
---
Architecture & Platform Constraints
- Two-process design: Plugin hook layer (intercepts Claude Code lifecycle events) ↔ Worker Service (Express.js HTTP on port 37777). Non-blocking (2s timeout).
- 5 lifecycle hooks: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop.
- MCP-based search: 3-layer progressive disclosure (search→timeline→observations) for token efficiency.
- Storage: SQLite + FTS5 primary; optional ChromaDB for hybrid semantic search. Observations table with hierarchical fields.
- Runtime dependency: Bun ≥ 1.0 (auto-installed if missing). Excludes pure Node.js/Deno; Windows only via WSL.
- Local-first, single-user: No multi-tenant or team sync.
- Security surface: Plugin observes all tool calls (file edits, shell commands). Issue #1251 confirms unauthenticated API + path traversal → local credential theft risk.
---
Pricing & Total Cost of Ownership
- Plugin itself: Free (MIT license). No paid tiers or SaaS upsell.
- Underlying cost: Claude Code subscription required ($200/month Max) or API billing.
- Claimed token cost reduction: 10×–20× (95%) less context injection vs full
CLAUDE.mddump. No independent audit. - Compression cost offset: AI compression runs on every session using Haiku ($0.25/M tokens) or another model. Net savings = gross injection savings − compression costs. Not measured.
- Hidden costs:
- Compression API calls (ongoing)
- Local disk/vector DB storage (negligible until large scale)
- Worker memory overhead (see performance section)
- Risk of bad memory retrieval → wasted iterations (Reddit reports)
TCO arithmetic (illustrative, assuming 10× savings):
- Project with 50K tokens of memory → 5K tokens injected per session → ~$0.13–0.30/session
- Over 100 sessions: $13–30 in API costs vs $125–300 without Claude-Mem
- But compression adds ~$0.02–0.10/session (Haiku) → net savings still significant if retrieval quality holds.
Reality check: Without independent benchmark, these numbers are hypothetical.
---
Performance, Scalability & Reliability
Performance Claims (all unsupported)
| Metric | Claimed Value | Source | Verification Status |
|---|---|---|---|
| Token reduction | 95% fewer | WorldofAI video (Feb 2026) | ❌ No methodology |
| Tool calls before context fill | 20× more | Agent 4 promotional | ❌ No control baseline |
| Cost reduction | ~10× | MindStudio (2025) | ❌ Vendor blog |
| Hook latency | <100ms per event | docs.claude-mem.ai | ❌ No p50/p99 data |
Scalability & Reliability Risks
| Issue | Evidence | Severity | Status |
|---|---|---|---|
| Memory leak (Issue #789) | Worker consumes 50+ GB after ~989 sessions | Critical – can crash workstation | Open (2026) |
| Chroma memory consumption (Issue #707) | Excessive RAM; SQLite-only mode proposed | High | Open |
| Bun `:sqlite` memory bloat (Issue #1509) | Request to switch to Node.js better-sqlite3 | High | Open |
| Unauthenticated local API (Issue #1251) | GET /api/settings leaks API keys | Critical – credential theft | Open (2026) |
| Path traversal in MCP tools (Issue #1251) | smart_unfold, smart_outline allow arbitrary file reads | Critical – file exfiltration | Open (2026) |
| DB corruption (troubleshooting guide) | Built-in integrity checks imply known risk | High | No recovery |
| No granular deletion (Issue #283) | GDPR compliance blocker | High | Open (2025) |
| No rollback/uninstall | Only manual removal; no uninstall command | Medium | Docs mention "repair" only |
Key contradiction: Agent 4's findings are absent from Agents 1–3. These issues must be considered current and unresolved as of this synthesis (mid-2026).
---
Developer Experience & Operational Workflow
Setup Friction
- Primary install:
npx claude-mem install(auto-detects Bun, prompts for provider) or/plugin marketplace addin Claude Code. - Time to first use: ~2–3 minutes.
- Pitfalls:
npm install -g claude-memonly installs SDK – not the plugin.- Provider selection during install; changes require manual settings edit.
- No VS Code extension – requires CLI or manual hook injection.
- Multi-machine sync absent (memory is local
~/.claude-mem/claude-mem.db).
Daily Workflow
- Capture: Hooks fire on every tool invocation.
- Compress: Background worker summarizes observations via chosen LLM.
- Store: SQLite + ChromaDB.
- Inject: Relevant compressed context injected at next session start.
Config knobs: CLAUDE_MEM_MODEL (default Haiku), CLAUDE_MEM_PROVIDER (Claude/Gemini/OpenRouter), CLAUDE_MEM_DATA_DIR.
Note: If the worker crashes, memory capture fails silently. No health monitoring built in.
---
Contradictions & Evidence Quality Assessment
The adversarial reviews identified critical inconsistencies:
| Contradiction | Source 1 | Source 2 | Resolution |
|---|---|---|---|
| Star count | 46K–65.8K (Agent 1, mid-2025) | 74.8K (Agent 4, 2026) | Trust Agent 4 (fresh source) – 74.8K |
| Version | v12.0.0 (Agent 1) | v13.1.0 (Agent 4, 2026) | Active development but critical bugs unfixed |
| Token savings | "Up to 95%" (Agent 1/4) | "~10×" (MindStudio) | 95% = 20×, 10× = 90% – discrepant, both unaudited |
| Security vulnerabilities | Not mentioned (Agents 1,2,3,5) | Issue #1251 (Agent 4) | Major omission – treat as current |
| Memory leak | Not mentioned (Agents 1,2,3,5) | Issue #789 (Agent 4) | Critical omission – treat as current |
| Agent-agnostic support | "Primarily Claude Code" (Agent 1) | "Gemini, Codex, Copilot" (Agent 2) | Support expanded but documentation "thinner" – parity unproven |
Overall evidence quality: Low for performance claims, medium for architecture, good for security/reliability issues (filed GitHub issues with reproduction steps). The project's own docs (docs.claude-mem.ai) lack dates and methodology for claims.
---
Risks & Mitigations
| Risk | Impact | Recommended Mitigation |
|---|---|---|
| Memory exhaustion (Issue #789) | Crash, data loss | Regularly restart worker; monitor RAM; limit session count |
| Security vulns (Issue #1251) | Credential theft, file read | Do not run on shared machines or CI; use firewall to block port 37777; consider running in isolated environment |
| Token savings unvalidated | Unexpected API cost | Run own benchmark (see verification steps below); cap compression model cost |
| Compression cost offset | Net savings lower than claimed | Use cheapest model (Haiku); log compression token usage |
| Over-retrieval harm | Task accuracy drops | Monitor Claude's behavior; reduce memory injection aggressiveness via settings |
| No team sync | Duplicated work, inconsistency | Use for individual projects only; no enterprise rollout |
| No rollback | Risk from buggy updates | Manual backup of ~/.claude-mem/ before upgrades |
Verification steps recommended before any deployment:
- Audit security: Check if Issue #1251 is closed. If open, test
curl http://localhost:37777/api/settings– does it leak keys? Try path traversal (../) in MCP tools. - Benchmark token savings:
- Run identical session sequences (e.g., 50 file edits + 20 commands) on same project.
- Measure context token usage with and without Claude-Mem (from API logs).
- Repeat 10 times, average.
- Publish methodology.
- Test memory leak: Run 1,000+ sessions (scripted) and monitor worker RAM usage.
- Check version compatibility: Verify the compression model does not conflict with your Claude Code subscription limits.
---
Recommendations & Decision Table
| Use Case | Recommendation | Rationale |
|---|---|---|
| Personal prototyping / learning | ✅ Use cautiously | Free, low friction, likely helpful for small projects. Watch for memory growth. |
| Daily individual developer | ⚠️ Use with mitigations | Acceptable if you can tolerate crashes and manually secure the API. Monitor Issues #789 and #1251. |
| Team / enterprise | ❌ Avoid | Critical security and reliability risks; no team sync; no compliance support. |
| Security-sensitive environments | ❌ Avoid entirely | Unauthenticated API and path traversal are dealbreakers until resolved. |
If you choose to use Claude-Mem:
- Run worker with
--port 37777bound to127.0.0.1only. - Regularly restart worker (e.g., daily cron) to mitigate memory leak.
- Back up
~/.claude-mem/before updates. - Monitor API logs for compression costs.
Alternatives to evaluate:
- Context Mode (simpler, in-session only, no persistence)
- Memsearch (agent-agnostic, Markdown-based, may have fewer performance issues – but less mature)
- Official Claude Memory (best security, but single-session)
- Manual context management (reliable but labor-intensive)
---
Conclusion
Claude-Mem is an innovative, widely-adopted open-source project that technically meets its core goal: persistent cross-session memory for Claude Code. However, the fresh, date-stamped evidence (2026) reveals unresolved critical issues that render it unsuitable for production, team, or security-conscious use. The claimed 10×–20× token cost reduction has never been independently validated. The project's momentum (74.8K stars, 223+ releases) does not mitigate the fact that two critical GitHub issues – memory exhaustion and security vulnerabilities – remain open.
Final judgment: A promising but immature tool. Worth experimenting with on isolated, personal projects. Do not deploy at scale or in any environment where data integrity or security are paramount, until the maintainers address Issues #789 and #1251.