English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

claude-mem: A Cross-Session Memory Layer Now Supporting 8 Coding Agents

Forum topic · ✨步子哥 · 2026-10-31

Summary

claude-mem, an open-source project by thedotmack, started as a Claude Code memory plugin and has evolved into a cross-agent memory layer supporting 8 coding agents: Claude Code, Grok Bot, OpenCode, T3 Code, Antigravity CLI, OMP, Pi, and DeepSeek Harness. It works in three stages: an observer silently captures informative tool-usage observations (decisions, bugfixes, security alerts), compresses them into semantic summaries stored in external log files, and automatically injects relevant context into new sessions. A v1.x feature called awareness push actively pushes detected needle observations to agents, with Grok Bot able to re-read logs from disk. The system supports multiple providers (CMEM Pro managed service, OpenRouter, Gemini, or an Anthropic plan) and OpenClaw Gateway. The post contrasts claude-mem with Orkas (a project-manager-style memory tool) and OpenMAIC's knowledge base, arguing that as coding-model capabilities converge, competition shifts from model strength to system architecture, making a shared, persistent, agent-agnostic memory layer essential infrastructure. The MIT-licensed TypeScript project has 1,723 stars on GitHub.

claude-mem: From Claude Code Plugin to a Cross-Session Memory Layer for 8 Agents

You finish a feature with Claude Code, close the terminal. The next day you open it, and it asks: "What were we working on?" You do the same with Codex, then with Antigravity, OpenCode, T3 Code — every one of them forgets.

This isn't a model problem, it's a session architecture problem. Each agent's context disappears when the session ends, because nothing is saving it.

thedotmack's claude-mem solved Claude Code's memory problem in June. By November, it's no longer just a Claude Code plugin — it supports 8 coding agents and has become a cross-agent memory layer.

Core Mechanism: Observe + Compress + Retrieve

claude-mem's workflow has three stages:

1. Observation

claude-mem's observer runs silently while you work, capturing tool usage observations — what commands you ran, what files you modified, what errors you hit, what decisions you made.

Key point: the observer doesn't record all conversation, only informative observations. These are classified as needle observations (decisions, bugfixes, security alerts, sensitive information) and appended to the bot's memory/log/YYYY-MM.md files.

2. Compression

Raw observations are long. claude-mem compresses them into semantic summaries — not verbatim records, but "what tech stack this project uses, what problems were solved, what key decisions were made."

This is the externalized version of "parameters as storage": memory isn't written into model weights, but into external files. The model reads these summaries on each startup to restore project context.

3. Retrieval

When a new session starts, claude-mem automatically injects relevant summaries into context. You don't need to search manually — it knows the current project and which memories are relevant.

It also provides search tools: you can actively search historical memories, filtered by project, date, or keywords.

8 Agents, One Memory Layer

claude-mem's supported coding agents:

| Agent | Install command | |-------|-----------------| | Claude Code | npx claude-mem install | | Grok Bot | npx claude-mem install --ide grok-bot | | OpenCode | npx claude-mem install --ide opencode | | T3 Code | npx claude-mem install --ide t3code | | Antigravity CLI | npx claude-mem install --ide antigravity | | OMP (Oh My Pi) | npx claude-mem install --ide omp | | Pi | npx claude-mem install --ide pi | | DeepSeek Harness | npx claude-mem install --ide dsh |

OpenClaw Gateway is also supported: curl -fsSL https://install.cmem.ai/openclaw.sh | bash

What does this mean? You can do part of your work in Claude Code, another part in Codex, and both agents share the same project memory. Each agent knows what the other did, without you re-explaining.

Awareness Push: From Passive Memory to Active Reminders

A key v1.x feature is the awareness push pilot (LFG + Orifice).

Previously claude-mem was passive — it only answered when asked. Awareness push is active — when the observer detects specific observation types (decision, bugfix, security_alert, sensitive), it automatically appends them to the bot's memory/log files.

Grok Bot can already re-read logs from disk. This means the agent doesn't need you to trigger a search — it automatically "remembers" relevant memories at the right time.

This applies "judgment-gate decoupling" to memory systems:

  • Judgment: the observer decides which observations are needles (worth remembering)
  • Gate: awareness push decides when to push memories to the agent
  • Multi-Provider Architecture

    claude-mem isn't tied to one model provider. At install you can choose:

    1. CMEM Pro (managed memory): claude-mem's hosted service, 30-day free trial, then falls back to your Anthropic plan 2. OpenRouter / Gemini key: use your own key 3. Anthropic plan: use your Claude subscription directly

    Memory compression and summarization can run on different models, without forcing a single provider.

    Comparison with Orkas

    Orkas and claude-mem both tackle agent memory, but in different directions:

    | Dimension | Orkas | claude-mem | |------|-------|-----------| | Memory carrier | Project (goals + rules + files + memory) | Semantic summaries + log files | | Memory scope | Within a single project | Cross-project, cross-agent | | Agent coordination | Commander assigns tasks to 16 specialists | Doesn't coordinate agents, only gives them memory | | Use case | Business work (research, content, video) | Coding work (writing code, debugging) | | Integration | Desktop app | CLI plugin embedded in existing agents |

    Orkas is "a project manager with memory"; claude-mem is "giving memory to existing agents." They don't conflict — you can use Orkas to manage projects and claude-mem to give your Claude Code memory.

    Comparison with OpenMAIC Knowledge Base

    OpenMAIC v1.3.0's knowledge base also addresses persistent memory, but differently:

  • OpenMAIC: materials live in a knowledge base, agents retrieve on demand. Memory is structured files.
  • claude-mem: observations are compressed into semantic summaries, automatically injected at agent startup. Memory is compressed text.
  • OpenMAIC's knowledge base suits educational scenarios (courseware and textbooks need full preservation); claude-mem's semantic summaries suit coding scenarios (you don't need to remember every command's full output, just what decisions were made and what problems were solved).

    Why This Matters

    Competition among coding agents has moved from "whose model is stronger" to "whose memory lasts longer."

    Model capabilities are converging — Claude, GPT, Gemini, DeepSeek are narrowing gaps on coding tasks. But all agents face the same problem: session ends, context disappears.

    claude-mem represents an infrastructure-minded approach: memory is not a model capability, it's a system architecture. Whatever model, whatever agent, the memory layer is shared, persistent, and cross-agent.

    This complements "parameters as storage" (SKIM): parameter storage suits factual knowledge (closed-form solutions written into weights), external memory suits procedural knowledge (what decisions were made, what bugs were hit, how they were fixed). The former is model-level memory; the latter is system-level memory.

    Data

  • GitHub: https://github.com/thedotmack/claude-mem
  • License: MIT
  • Language: TypeScript / Shell
  • Stars today: 1,723
  • Supported agents: 8 (Claude Code / Grok Bot / OpenCode / T3 Code / Antigravity / OMP / Pi / DeepSeek Harness)
  • Providers: CMEM Pro / OpenRouter / Gemini / Anthropic plan
  • OpenClaw Gateway: supported
  • 30+ language translations
---

What claude-mem does isn't new — persistent memory, semantic compression, cross-session retrieval — but making it an infrastructure layer across 8 agents, so memory is no longer bound to one model or tool, is new. As coding-agent competition shifts from "model capability" to "system architecture," memory layers will become standard equipment.

Tags

#claude-mem#claude-code#ai-agents#persistent-memory#coding-agents#developer-tools#open-source#cross-session-context

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178636635