Releases: thedotmack/claude-mem
v10.0.8
Bug Fixes
Orphaned Subprocess Cleanup
- Add explicit subprocess cleanup after SDK query loop using existing
ProcessRegistryinfrastructure (getProcessBySession+ensureProcessExit), preventing orphaned Claude subprocesses from accumulating - Closes #1010, #1089, #1090, #1068
Chroma Binary Resolution
- Replace
npx chroma runwith absolute binary path resolution viarequire.resolve, falling back tonpxwith explicitcwdwhen the binary isn't found directly - Closes #1120
Cross-Platform Embedding Fix
v10.0.7
Chroma HTTP Server Architecture
- Persistent HTTP server: Switched from in-process Chroma to a persistent HTTP server managed by the new
ChromaServerManagerfor better reliability and performance - Local embeddings: Added
DefaultEmbeddingFunctionfor local vector embeddings — no external API required - Pinned chromadb v3.2.2: Fixed compatibility with v2 API heartbeat endpoint
- Server lifecycle improvements: Addressed PR review feedback for proper start/stop/health check handling
Bug Fixes
- Fixed SDK spawn failures and sharp native binary crashes
- Added
plugin.jsonto root.claude-plugindirectory for proper plugin structure - Removed duplicate else block from merge artifact
Infrastructure
- Added multi-tenancy support for claude-mem Pro
- Updated OpenClaw install URLs to
install.cmem.ai - Added Vercel deploy workflow for install scripts
- Added
.claude/plansand.claude/worktreesto.gitignore
v10.0.6
Bug Fixes
-
OpenClaw: Fix MEMORY.md project query mismatch —
syncMemoryToWorkspacenow includes both the base project name and the agent-scoped project name (e.g., both "openclaw" and "openclaw-main") when querying for context injection, ensuring the correct observations are pulled into MEMORY.md. -
OpenClaw: Add feed botToken support for Telegram — Feeds can now configure a dedicated
botTokenfor direct Telegram message delivery, bypassing the OpenClaw gateway channel. This fixes scenarios where the gateway bot token couldn't be used for feed messages.
Other
- Changed OpenClaw plugin kind from "integration" to "memory" for accuracy.
v10.0.5
OpenClaw Installer & Distribution
This release introduces the OpenClaw one-liner installer and fixes several OpenClaw plugin issues.
New Features
- OpenClaw Installer (
openclaw/install.sh): Full cross-platform installer script withcurl | bashsupport- Platform detection (macOS, Linux, WSL)
- Automatic dependency management (Bun, uv, Node.js)
- Interactive AI provider setup with settings writer
- OpenClaw gateway detection, plugin install, and memory slot configuration
- Worker startup and health verification with rich diagnostics
- TTY detection,
--provider/--api-keyCLI flags - Error recovery and upgrade handling for existing installations
- jq/python3/node fallback chain for JSON config writing
- Distribution readiness tests (
openclaw/test-install.sh): Comprehensive test suite for the installer - Enhanced
/api/healthendpoint: Now returns version, uptime, workerPath, and AI status
Bug Fixes
- Fix: use
event.promptinstead ofctx.sessionKeyfor prompt storage in OpenClaw plugin - Fix: detect both
openclawandopenclaw.mjsbinary names in gateway discovery - Fix: pass file paths via env vars instead of bash interpolation in
node -ecalls - Fix: handle stale plugin config that blocks OpenClaw CLI during reinstall
- Fix: remove stale memory slot reference during reinstall cleanup
- Fix: remove opinionated filters from OpenClaw plugin
v10.0.4
Revert: v10.0.3 chroma-mcp spawn storm fix
v10.0.3 introduced regressions. This release reverts the codebase to the stable v10.0.2 state.
What was reverted
- Connection mutex via promise memoization
- Pre-spawn process count guard
- Hardened
close()with try-finally + Unixpkill -Pfallback - Count-based orphan reaper in
ProcessManager - Circuit breaker (3 failures → 60s cooldown)
etime-based sorting for process guards
Files restored to v10.0.2
src/services/sync/ChromaSync.tssrc/services/infrastructure/GracefulShutdown.tssrc/services/infrastructure/ProcessManager.tssrc/services/worker-service.tssrc/services/worker/ProcessRegistry.tstests/infrastructure/process-manager.test.tstests/integration/chroma-vector-sync.test.ts
v10.0.3
Fix: Prevent chroma-mcp spawn storm (PR #1065)
Fixes a critical bug where killing the worker daemon during active sessions caused 641 chroma-mcp Python processes to spawn in ~5 minutes, consuming 75%+ CPU and ~64GB virtual memory.
Root Cause
ChromaSync.ensureConnection() had no connection mutex. Concurrent fire-and-forget syncObservation() calls from multiple sessions raced through the check-then-act guard, each spawning a chroma-mcp subprocess via StdioClientTransport. Error-driven reconnection created a positive feedback loop.
5-Layer Defense
| Layer | Mechanism | Purpose |
|---|---|---|
| 0 | Connection mutex via promise memoization | Coalesces concurrent callers onto a single spawn attempt |
| 1 | Pre-spawn process count guard (execFileSync('ps')) |
Kills excess chroma-mcp processes before spawning new ones |
| 2 | Hardened close() with try-finally + Unix pkill -P fallback |
Guarantees state reset even on error, kills orphaned children |
| 3 | Count-based orphan reaper in ProcessManager |
Kills by count (not age), catches spawn storms where all processes are young |
| 4 | Circuit breaker (3 failures → 60s cooldown) | Stops error-driven reconnection positive feedback loop |
Additional Fix
- Process guards now use
etime-based sorting instead of PID ordering for reliable age determination (PIDs wrap and don't guarantee ordering)
Testing
- 16 new tests for mutex, circuit breaker, close() hardening, and count guard
- All tests pass (947 pass, 3 skip)
Closes #1063, closes #695. Relates to #1010, #707.
Contributors: @rodboev
v10.0.2
Bug Fixes
- Prevent daemon silent death from SIGHUP + unhandled errors — Worker process could silently die when receiving SIGHUP signals or encountering unhandled errors, leaving hooks without a backend. Now properly handles these signals and prevents silent crashes.
- Hook resilience and worker lifecycle improvements — Comprehensive fixes for hook command error classification, addressing issues #957, #923, #984, #987, and #1042. Hooks now correctly distinguish between worker unavailability errors and other failures.
- Clarify TypeError order dependency in error classifier — Fixed error classification logic to properly handle TypeError ordering edge cases.
New Features
- Project-scoped statusline counter utility — Added
statusline-counts.jsfor tracking observation counts per project in the Claude Code status line.
Internal
- Added test coverage for hook command error classification and process manager
- Worker service and MCP server lifecycle improvements
- Process manager enhancements for better cross-platform stability
Contributors
v10.0.1
What's Changed
OpenClaw Observation Feed
- Enabled SSE observation feed for OpenClaw agent sessions, allowing real-time streaming of observations to connected OpenClaw clients
- Fixed
ObservationSSEPayload.projecttype to be nullable, preventing type errors when project context is unavailable - Added
EnvManagersupport for OpenClaw environment configuration
Build Artifacts
- Rebuilt worker service and MCP server with latest changes
v10.0.0 — OpenClaw Integration
OpenClaw Plugin — Persistent Memory for OpenClaw Agents
Claude-mem now has an official OpenClaw plugin, bringing persistent memory to agents running on the OpenClaw gateway. This is a major milestone — claude-mem's memory system is no longer limited to Claude Code sessions.
What It Does
The plugin bridges claude-mem's observation pipeline with OpenClaw's embedded runner (pi-embedded), which calls the Anthropic API directly without spawning a claude process. Three core capabilities:
- Observation Recording — Captures every tool call from OpenClaw agents and sends it to the claude-mem worker for AI-powered compression and storage
- MEMORY.md Live Sync — Writes a continuously-updated memory timeline to each agent's workspace, so agents start every session with full context from previous work
- Observation Feed — Streams new observations to messaging channels (Telegram, Discord, Slack, Signal, WhatsApp, LINE) in real-time via SSE
Quick Start
Add claude-mem to your OpenClaw gateway config:
{
"plugins": {
"claude-mem": {
"enabled": true,
"config": {
"project": "my-project",
"syncMemoryFile": true,
"observationFeed": {
"enabled": true,
"channel": "telegram",
"to": "your-chat-id"
}
}
}
}
}The claude-mem worker service must be running on the same machine (localhost:37777).
Commands
/claude-mem-status— Worker health check, active sessions, feed connection state/claude-mem-feed— Show/toggle observation feed status/claude-mem-feed on|off— Enable/disable feed
How the Event Lifecycle Works
OpenClaw Gateway
├── session_start ──────────→ Init claude-mem session
├── before_agent_start ─────→ Sync MEMORY.md + track workspace
├── tool_result_persist ────→ Record observation + re-sync MEMORY.md
├── agent_end ──────────────→ Summarize + complete session
├── session_end ────────────→ Clean up session tracking
└── gateway_start ──────────→ Reset all tracking
All observation recording and MEMORY.md syncs are fire-and-forget — they never block the agent.
📖 Full documentation: OpenClaw Integration Guide
Windows Platform Improvements
- ProcessManager: Migrated daemon spawning from deprecated WMIC to PowerShell
Start-Processwith-WindowStyle Hidden - ChromaSync: Re-enabled vector search on Windows (was previously disabled entirely)
- Worker Service: Added unified DB-ready gate middleware — all DB-dependent endpoints now wait for initialization instead of returning "Database not initialized" errors
- EnvManager: Switched from fragile allowlist to simple blocklist for subprocess env vars (only strips
ANTHROPIC_API_KEYper Issue #733)
Session Management Fixes
- Fixed unbounded session tracking map growth — maps are now cleaned up on
session_end - Session init moved to
session_startandafter_compactionhooks for correct lifecycle handling
SSE Fixes
- Fixed stream URL consistency across the codebase
- Fixed multi-line SSE data frame parsing (concatenates
data:lines per SSE spec)
Issue Triage
Closed 37+ duplicate/stale/invalid issues across multiple triage phases, significantly cleaning up the issue tracker.
v9.1.1
Critical Bug Fix: Worker Initialization Failure
v9.1.0 was unable to initialize its database on existing installations. This patch fixes the root cause and several related issues.
Bug Fixes
-
Fix FOREIGN KEY constraint failure during migration — The
addOnUpdateCascadeToForeignKeysmigration (schema v21) crashed when orphaned observations existed (observations whosememory_session_idhas no matching row insdk_sessions). Fixed by disabling FK checks (PRAGMA foreign_keys = OFF) during table recreation, following SQLite's recommended migration pattern. -
Remove hardcoded CHECK constraints on observation type column — Multiple locations enforced
CHECK(type IN ('decision', 'bugfix', ...))but the mode system (v8.0.0+) allows custom observation types, causing constraint violations. Removed all 5 occurrences acrossSessionStore.ts,migrations.ts, andmigrations/runner.ts. -
Fix Express middleware ordering for initialization guard — The
/api/*guard middleware that waits for DB initialization was registered AFTER routes, so Express matched routes before the guard. Moved guard middleware registration BEFORE route registrations. Added dedicated early handler for/api/context/injectto fail-open during init.
New
- Restored mem-search skill — Recreated
plugin/skills/mem-search/SKILL.mdwith the 3-layer workflow (search → timeline → batch fetch) updated for the current MCP tool set.