claude-mem
AI Coding ToolsA persistent memory compression system that preserves context across Claude Code sessions by capturing tool usage and generating semantic summaries.
Features
- Preserves session context across restarts
- Automatically captures tool usage observations
- Generates semantic summaries of captured data
- Makes stored knowledge available to future Claude Code sessions
Recent releases
View all 118 releases →- Full Postgres + BullMQ event-to-observation pipeline with idempotent enqueue, request‑id propagation, and structured audit log.
- New API surface: POST /v1/events, POST /v1/sessions/start, GET/POST generation‑job controls, MCP routes, scoped reads.
- Legacy compat shims for `/api/sessions/observations` and `/api/sessions/summarize` mapping old payloads to the new model with improved error handling.
Full changelog
Server-beta event pipeline (phases 4–13)
This release lands the full server-beta track developed on server-beta-phase-4-event-pipeline — a self-contained Postgres + BullMQ event-to-observation pipeline with API-key auth, team/project scope, audit log, three AI providers (Anthropic, OpenAI, Google), a dedicated MCP server, legacy compat adapters for existing worker clients, a Docker/Compose stack, and a generation-job retry/cancel surface.
Highlights
- Event pipeline:
agent_event→observation_generation_jobs(outbox) → BullMQ worker →observationrow. Idempotent enqueue, request-id propagation end-to-end, structured audit log. - API surface:
POST /v1/events,POST /v1/sessions/start,POST /v1/sessions/:id/end, generation-job list/retry/cancel, MCP routes, scoped reads. - Legacy compat:
/api/sessions/observationsand/api/sessions/summarizeshims map legacy worker payloads into the new event/job model without touching worker code. Both shims now wrap session lookup in their try/catch so Postgres failures return structured JSON, andresolveServerSessionsurvives TOCTOU races via 23505 catch-and-refetch. - POST /v1/sessions/start also catches 23505 on concurrent start with the same
externalSessionIdand refetches the winning row instead of returning 500. - Generation providers: Anthropic, OpenAI, and Google with per-team-project scope enforcement and error classification.
- Docker / Compose stack and
bin/server-beta-clifor local operator workflows.
Bug fixes
resolveServerSessionPostgres errors no longer escapeasyncHandler.catch(next)and return HTML 500s to legacy clients.POST /v1/sessions/startno longer returns 500 to the loser of a concurrent same-externalSessionIdrace.
Full PR thread: #2383.
Fixed crash in `onclose` handler by background tree‑kill on unexpected subprocess exit.
Full changelog
Bug fixes
MCP server
- #2371 — drop
${_R%/}parameter-expansion trim in.mcp.jsonthat tripped Claude Code's MCP validator
Environment isolation
- #2357 — block
ANTHROPIC_BASE_URLleak; use a three-branch OAuth-skip predicate - Add
CLAUDE_MEM_ENV_FILElazy resolver so tests (and multi-profile users) can redirect the env-file path without module-load-order constraints
Worker lifecycle
- Classify Claude SDK HTTP 400 as unrecoverable so the worker stops retrying a doomed request
- Stop hook crash hardened:
onclosehandler now performs background tree-kill on unexpected subprocess exit
Chroma
- #2313 — enforce a single
chroma-mcpsubprocess per worker (singleton viadisposeCurrentSubprocess()on every code path; tree-kill of orphans on dispose) - Pin
onnxruntime>=1.20andprotobuf<7to fixINVALID_PROTOBUFon macOS arm64
Build
- Polyfill
import.meta.urltopathToFileURL(__filename)in the CJS worker bundle so ESM-style code resolves correctly (CodeRabbit-driven follow-up)
Tests / review
tests/env-isolation.test.tsno longer mutates the real~/.claude-mem/.env; OAuth spy wrapped in try/finally to avoid leaks across runs- 3 new chroma-mcp regression tests for #2313 (singleton enforcement)
Misc
- Daily dependency bump per CLAUDE.md maintenance policy
Full diff: https://github.com/thedotmack/claude-mem/pull/2394
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.