Skip to content

claude-mem

AI Coding Tools

A persistent memory compression system that preserves context across Claude Code sessions by capturing tool usage and generating semantic summaries.

TypeScript Latest v13.4.0 · 5d ago Security brief →

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 →
No immediate action
v13.4.0 Breaking risk

OpenRouter config + defect backlog clearance

No immediate action
v13.3.0 Bug fix

Codex replay fix + MCP warning removal

No immediate action
v13.2.0 New feature

wowerpoint skill

v13.1.0 New feature
Notable features
  • 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_eventobservation_generation_jobs (outbox) → BullMQ worker → observation row. 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/observations and /api/sessions/summarize shims 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, and resolveServerSession survives TOCTOU races via 23505 catch-and-refetch.
  • POST /v1/sessions/start also catches 23505 on concurrent start with the same externalSessionId and 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-cli for local operator workflows.

Bug fixes

  • resolveServerSession Postgres errors no longer escape asyncHandler.catch(next) and return HTML 500s to legacy clients.
  • POST /v1/sessions/start no longer returns 500 to the loser of a concurrent same-externalSessionId race.

Full PR thread: #2383.

v13.0.1 Bug fix

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.json that tripped Claude Code's MCP validator

Environment isolation

  • #2357 — block ANTHROPIC_BASE_URL leak; use a three-branch OAuth-skip predicate
  • Add CLAUDE_MEM_ENV_FILE lazy 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: onclose handler now performs background tree-kill on unexpected subprocess exit

Chroma

  • #2313 — enforce a single chroma-mcp subprocess per worker (singleton via disposeCurrentSubprocess() on every code path; tree-kill of orphans on dispose)
  • Pin onnxruntime>=1.20 and protobuf<7 to fix INVALID_PROTOBUF on macOS arm64

Build

  • Polyfill import.meta.url to pathToFileURL(__filename) in the CJS worker bundle so ESM-style code resolves correctly (CodeRabbit-driven follow-up)

Tests / review

  • tests/env-isolation.test.ts no 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.

About

Stars
80,379
Forks
6,922
Languages
TypeScript JavaScript Shell
Downloads/week
16,458 ↓18%
NPM Maintainers
1
Contributors
108

Install & Platforms

Install via
npm

Open source alternatives

Beta — feedback welcome: [email protected]