ai-setup 5 min read

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.

By
Share: X in
GitHub social preview card for thedotmack/claude-mem

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

FieldValue
Full namethedotmack/claude-mem
Homepagehttps://claude-mem.ai
LanguageTypeScript
LicenseApache-2.0
Stars95,605
Forks8,460
Open issues128
Sizeabout 510 MB
Owner typeUser
Created2025-08-31
Last push2026-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