claude-mem: AI agent memory that survives sessions
claude-mem keeps context across AI coding agent sessions, compressing session activity and injecting relevant memory back, with 95,605 GitHub stars.
TL;DR: claude-mem is a TypeScript project that records what your coding agent did during a session, compresses that record with AI, and injects the relevant parts back into later sessions. It is built to work across Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, and OpenCode. At 95,605 stars it has crossed into mainstream territory for agent tooling.
What it claims to do
The project description frames the problem plainly: an agent loses its memory when a session ends, so the next session starts cold. claude-mem sits in between. It captures everything the agent does while a session runs, compresses that history with AI, and feeds the relevant slice back into future sessions.
The second half of that claim matters more than the first. Writing a log is easy. Deciding which fragment of yesterday’s work matters for today’s task, and getting that decision right often enough to be worth the tokens, is the hard part. The compression step is where this project puts its weight.
The agent list in the description is the other thing to notice. This is not a Claude Code extension with a friendly name. It is positioned as harness-agnostic, and the topics confirm that framing, listing anthropic alongside generic entries like ai-agents and ai-memory.
What the metadata says
| Field | Value |
|---|---|
| Full name | thedotmack/claude-mem |
| Homepage | https://claude-mem.ai |
| Language | TypeScript |
| License | Apache-2.0 |
| Stars | 95,605 |
| Forks | 8,460 |
| Open issues | 128 |
| Size | about 510 MB |
| Owner type | User |
| Created | 2025-08-31 |
| Last push | 2026-10-04 |
Two fields stand out. The first is the issue count. 128 open issues against 95,605 stars is a remarkably low ratio, and it suggests either that the tool absorbs friction well or that triage happens somewhere other than the public tracker.
The second is size. A 510 MB TypeScript repository is large for application code, which points to bundled data of some kind rather than a pure source tree.
The topic list hints at the architecture
The declared topics include chromadb, alongside ai, ai-agents, ai-memory, anthropic, and artificial-intelligence. A vector database dependency in the topic list is a reasonable signal that retrieval, not just storage, is doing the work here. Compressing session history into embeddings and searching it later matches the stated behavior of injecting only relevant context.
That is inference from metadata rather than a claim from the documentation, so treat it as a hypothesis to check against the source. It is still more signal than most repos give you.
If you want to confirm the details yourself, the API answers in one call:
curl -sL -H "Accept: application/vnd.github+json" \
https://api.github.com/repos/thedotmack/claude-mem \
| jq '{description, topics, license: .license.spdx_id}'
Comparing it against a neighbour
Agent memory is becoming its own category, which means there are now several projects claiming overlapping ground. A quick shell loop gets you the headline numbers for a short list before you read anything:
for r in thedotmack/claude-mem mksglu/context-mode; do
curl -sL -H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$r" \
| jq -r '"\(.full_name): \(.stargazers_count) stars, \(.license.spdx_id), \(.pushed_at[0:10])"'
done
The last push date is the field worth weighting. In this category, an agent-memory layer that has gone six months without a commit is a liability, because the harnesses it wraps keep moving.
When to reach for it
It fits if you run coding agents across more than one harness and keep hitting the cold-start problem, where each new session re-derives project context that an earlier session already established. It also fits if you want the memory layer to be independent of whichever tool happens to be trending that month.
The Apache-2.0 license is worth noting for anyone planning to run this in a company environment. Compared with the MIT license many comparable tools ship under, Apache-2.0 carries an explicit patent grant and more specific redistribution terms, so read it before you wrap it in a product.
When to skip it
Skip it if you work in a single harness and your sessions are short. The problem it solves does not bite as hard when you are not paying to re-establish context, and adding a capture-and-retrieve layer is overhead in that case.
Also weigh the obvious cost before adopting anything that records every action your agent takes. You are building a searchable history of your codebase work, and where that history lands on disk, how long it persists, and who can read it are questions to answer before you turn it on, not after.
Source and Accuracy Notes
- Project page: https://github.com/thedotmack/claude-mem
- Source repository: thedotmack/claude-mem (verified via GitHub API
html_url) - License: Apache-2.0 (verified via GitHub API
license.spdx_id) - Stars at time of writing: 95,605
Related Posts
ai-setup
Recall – Persistent Memory for Claude Code via MCP Hooks
Recall gives Claude Code a permanent memory store that survives session restarts and context compaction. Four hooks capture and restore context automatically — with cloud SaaS or self-hosted options.
2/28/2026
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026