先看一组数字。Anchor Terminal 在 10 月 30 日截取的 GitHub 快照里,claude-mem 的总星数到了 105,550,单日进账 1,145 颗。同一天的全语言日榜上,记忆类项目占了显眼的几席:Hindsight 56,437 星,单日进账 1,454 颗;MemPalace 也挤进了 Python 日榜。再往前倒十一天,AI Memory 这个项目涨了 3,793 颗星,相对涨幅 35%,是上一期榜单七个项目里相对涨幅最大的一个。
一个仓库从 2025 年 8 月底创建到现在攒下十万星,靠的不是新模型,也不是新框架,而是一件每个天天用编码 Agent 的人都碰到过的事:会话一关,Agent 就把你忘了。这篇文章拆一拆 claude-mem 到底存了什么、怎么存、和另外几种记忆方案差在哪,以及动手装之前要知道的坑。
会话一断,上下文就清零
用 Claude Code 或者 Codex 干活的人都有这个体验。昨天调了三个小时的报错,今天开新会话,Agent 又从头问一遍项目结构。上周定下来的技术选型,这周它给你推荐了一个完全相反的方案。不是模型变笨了,是它的记忆只活在当前这个会话里。
断片的成本是可以算出来的。每次开新会话,你要么花十分钟把背景重新讲一遍,要么让 Agent 自己把仓库再扫一遍,两种做法都在烧 token。更麻烦的是隐性成本:它已经踩过的坑会再踩一遍,已经否决的方案会再提一遍。项目越大,重复越贵。有个细节很多人没意识到,重扫一遍仓库产生的上下文,往往不是免费的,它会挤占本次会话真正干活的窗口。 还有个更隐蔽的浪费:Agent 重扫仓库时读进去的文件,会把真正有用的上下文挤出注意力窗口。你以为是它变笨了,其实是它把预算花在了重新认识你这件事上。长会话里这种挤压感受不明显,因为发生在后台;但账单不会说谎,每个新会话开头那段重复劳动,都是实打实的 token 支出。
社区给这个问题起了个名字,叫会话间隙。这次 GitHub 榜上扎堆出现的记忆项目,瞄准的都是这条缝。Anchor Terminal 的报告里有一句话说得直白:对每天用 Agent 的人来说,两次会话之间的空白仍然是最显眼的缺口。
claude-mem 在钩子后面做了什么
claude-mem 的作者是 Alex Newman,仓库挂在 thedotmack 名下,Apache-2.0 许可,当前版本 15.2.0,要求 Node 不低于 20。它的自我定位是给 Claude Code 造的持久记忆压缩系统,但安装命令已经覆盖了 OpenCode、T3 Code、Antigravity CLI、Pi、DeepSeek Harness 等一串宿主,OpenClaw 网关也有一条单独的脚本。
它的工作链路分四步。第一步,生命周期钩子在 Agent 干活的时候自动捕获工具调用观察,你改了哪个文件、跑了哪条命令、踩了哪个报错,都被记下来。第二步,一个模型把这些观察压缩成语义摘要,原始流水账不直接进库,这一步是压缩二字的来源。第三步,摘要落进 SQLite 加 Chroma 的双层存储,结构化数据走前者,向量检索走后者。第四步,本地起一个 worker 提供 HTTP 接口,再暴露四个 MCP 工具给 Agent 做分层检索。
分层检索是它和省 token 直接相关的设计。Agent 先用粗粒度工具搜到候选条目,看清这一层的代价之后,再决定要不要拉完整细节,官方把这叫渐进式披露。换句话说,记忆不是一股脑塞回上下文,而是按层取,取到哪层花哪层的钱。配套的 mem-search 技能把查询流程固定成三步,避免 Agent 每次都重新发明检索姿势。 双存储的分工值得多说一句。SQLite 管结构化的事实和索引,哪次观察发生在哪个会话、属于哪个项目、什么类型,这类查询走关系库最快;Chroma 管语义相似度,你问「上次那个跨域问题怎么修的」,它按意思而不是按关键词找。两层各管一段,避免了单靠向量库时元数据查询慢、单靠关系库时语义检索傻的两头不靠。
worker 这层也不只是个接口。它启动时会打印一个本地地址,打开就是 My Work 页面,实时请求、处理进度、待你评审的交接项都列在那里。记忆在后台攒,你在前台能看到它攒了什么,这个透明度对刚上手的人很重要,不然你永远不确定它到底记没记住。
检索出来的历史观察还带编号,Agent 引用过去某次结论的时候可以挂编号,这个设计叫引用,方便你回头核对它说的上次到底是哪次。本地查看器里能看到实时请求、处理进度和人工交接队列,团队场景另有一个共享工作区,但个人请求和评审笔记默认留在本地。 还有个细节适合团队场景:共享工作区里每条结论都带成员署名,谁贡献了什么一目了然。个人空间里的请求和笔记不会自动同步上去,共享是显式动作,不是默认行为。
同一条赛道的另外三种存法
记忆不是只有压缩摘要一条路。把这次榜上四个项目摆在一起,设计分歧一眼就能看出来。
还有开源协议的分歧。claude-mem 和 Hindsight 这类选了 Apache-2.0 或 MIT,企业拿去嵌入自己的产品没有障碍;教学类的 LearnHarness 选了 AGPL-3.0,商用就得掂量。记忆层是要住进你开发流程最深处的东西,协议的友好程度,某种程度上比功能列表更能决定它能不能进公司内网。
claude-mem 押注压缩,省上下文但丢原文措辞。MemPalace 走另一个极端,逐字存对话,用语义搜索往回捞,措辞全留但检索量更大,它那天在 Python 日榜只有 357 颗星,体量小一个数量级。Hindsight 把操作抽象成保留、召回、反思三个动词,README 里说它的 LongMemEval 成绩有弗吉尼亚理工和华盛顿邮报的研究者复现过,同时承认图表里其他厂商的数字是自报的。Mem0 只追加不覆盖旧记忆,它的基准成绩注明包含托管平台优化,开源 SDK 不一定复现。
这个对比里有个诚实的提醒:四家里有三家在 README 里引用了 LongMemEval,但基本都是自报数据。选型别只看那个分数,要看存储模型合不合你的工作流。要原文措辞选逐字派,要省 token 选压缩派,要多 Agent 分库选 Hindsight 那种按主体隔离的设计。 一个容易忽略的点:这四个项目的商业模式几乎一样,开源仓库免费,托管服务收费。星数衡量的是关注度,不是装机量,更不是留存。选型时把星数当线索,别当结论。
装之前要知道的三个坑
第一个坑在安装方式。npm install -g claude-mem 装上去的只是 SDK 和库,钩子不会注册,worker 不会启动。正确入口是 npx claude-mem install,或者在 Claude Code 里走插件市场。装错的表现很安静:命令都在,就是什么都不记,很多人会以为已经装好了。
第二个坑在账号。安装器会引导你登录 claude-mem 的托管观察器,邮箱魔法链接,不用绑卡,送 30 天试用。试用期内记忆走托管通道,官方说法是这部分消耗不占你的 Anthropic 套餐额度。试用结束后自动回落到你的 Anthropic 套餐。不想登录的话,加 --provider 参数自己指定 OpenRouter 或 Gemini 的 key,也可以设 CLAUDE_MEM_ONLINE_OPTIN 为 false 跳过整个在线流程,CI 这类非交互环境里默认就不弹登录。
第三个坑在隐私边界。记忆系统默认在后台持续记录工具行为,敏感内容要显式排除。claude-mem 的做法是尖括号 private 标签,被包住的段落不进存储。装完先去文档里把上下文注入的细粒度开关过一遍,决定哪些项目要记、哪些不记,比事后清理省心得多。 第四个要说的是重启。插件装完必须重启宿主才生效,钩子是在启动时注册的。很多人装完直接开新会话发现没记忆,以为装失败了,其实只是没重启。OpenCode 那边文档单独强调了这一点,1.3.4 以上的版本都支持,OpenCode 2 也一样。
五条命令跑通一遍
以 Claude Code 为例,完整链路是这几条。
# 方式一:插件市场,推荐
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
# 方式二:命令行安装器
npx claude-mem install
# 跳过在线登录,完全自己控制
npx claude-mem install --provider host
装完重启 Claude Code,新会话里上一轮的项目上下文会自动出现。想确认记忆在工作,打开启动时打印的本地查看器地址,会话记录、检索记录和待评审队列都在那个页面上。装 OpenCode 的话要求版本不低于 1.3.4,OpenCode 2 也在支持列表里,同样装完重启生效。装 Grok Bot 是另一条路,那个宿主没有钩子,claude-mem 改成盯聊天日志文件。 验证记忆生效有个笨办法但很可靠:故意在新会话里问一个上一轮才聊过的细节,比如「上次那个配置放哪了」,看它能不能给出带编号的引用。能给出,说明捕获、压缩、检索整条链路都通了;给不出,去查看器里看是观察没落库,还是检索没命中,两类问题的修法完全不同。
这股记忆热还能烧多久
几个信号值得留意。 把视野再拉宽一点,这两周的榜单其实讲了同一个故事。十强里大多数项目不是新 Agent,而是给你已经在跑的 Agent 配的零件:技能文件、记忆层、教学外壳。CleanYourTV 那种四万多星的项目,本质也是把编码 Agent 当成通用安装器来用。零件生态的繁荣,说明 Agent 本体已经站稳了,大家开始往上面叠层。
需求侧,AI Memory 十一天涨 35%,Superpowers 这种技能集项目单日还能进账 1,255 颗星,总星数已经 309,155,给 Agent 补能力的工具整体都在上升通道。口径侧,GitHub 的 robots.txt 明确拦了 Trending 周榜和月榜的抓取,第三方榜单以后只能靠新建仓库的真实星数拼窗口,跨周对比会越来越难做。评测侧,记忆项目的基准分目前以自报为主,Hindsight 那种找外部机构复现的做法如果成了风气,选型才有硬依据。
我的判断是,会话间隙是当下 Agent 体验里最硌脚的那颗石子,在模型自带的长时记忆成熟之前,外挂记忆层会持续是刚需。十万星不代表 claude-mem 是终点,它只说明这条赛道被验证过了。装一个跑两周,看你自己的断片成本降没降,比看任何榜单都准。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Look at a set of numbers first. In a GitHub snapshot intercepted on October 30th, the total number of stars in claude-mem reached 105,550, accounting for 1,145 on a single day. On the same day ' s full-language loglist, the Memory Project received several prominent seats: the Hindusight 56,437 star, with 1,454 single-day entries; and MemPalace was squeezed into the Python log. Eleven days later, the AI Memoory project increased by 3,793 stars, a 35 per cent relative increase, the largest relative increase in the seven items on the last list.
A warehouse was created at the end of August 2025 and has now saved 100,000 stars, not on a new model or framework, but on a matter that happens to everyone who uses code every day: Agent forgets you at once. This article opens up what's left of the claude-mem, how is it stored, what's wrong with the other memory options, and what you need to know before you do it.
As soon as the session is over, context is zero.
People who work with Claude Code or Codex have this experience. Three hours yesterday, a new session took place, and Agent asked the project structure from the beginning. The technical selection that was made last week, it suggested to you the exact opposite. It's not the model that gets stupid, it's the memory that only lives in this conversation.
The cost of the clip can be calculated. Every new session, you either take 10 minutes to rephrase the background, or Agent cleans the warehouse again, and both are burning token. Even more troublesome is the hidden cost: the pits it has stepped on will be stepped again, and the options that have been rejected will be referred to again. The larger the project, the more expensive it is to repeat it. In one detail, many people did not realize that context, which was generated by the re-cleaning of the warehouse, was often not free of charge, would crowd out the window where the session actually worked. And there's a much more subtle waste: Agent's re-cleaning the warehouse with the documents that he read in would crowd out a really useful context window. You think it's stupid, but it's spending the budget on you again. This sense of pressure is not evident in the long session, because it happens backstage; however, the bill does not lie, and the repetition of work at the beginning of each new session is a solid token expense.
The community gave the issue a name, the gap between sessions. And this time, the memory project that appeared on GitHub's list was all aimed at this stitch. The report of Anchor Terminal contains a clear statement: for those who use Agent every day, the gap between the two sessions remains the most visible.
What did Claude-mem do behind the hook?
Claude-mem is written by Alex Newman, a warehouse hanging under thedotmack, Apache-2.0 license, current version 15.2.0, which requires Node not less than 20. Its self-location is a permanent memory compression system for Claude Code, but the installation orders already cover a host of OpenCode, T3Code, Antigravity CLI, Pi, DeepSeek Harness, and a separate script for the OpenClaw gateway.
It works in four steps. In the first step, the life cycle hook automatically captures tool call observations while working in Agent, and you've changed which document, which order you've made, which you've made, which you've made, which you've made. In the second step, a model compresses these observations into semantic summary, and the original flow book does not go directly into the library, which is the source of the word compression. In the third step, summary entered the double layer of SQLite plus Chroma, structured the former, and retrieved the latter. In the fourth step, a local workingr provides an HTTP interface and exposes four MCP tools to Agent for tiered retrieval.
Layer search is a design directly related to provincial token. Agent searched the candidates with a crude particle size tool to see the price of the layer before deciding whether to pull the full details and call it a gradual disclosure. In other words, memory is not a brain plug back to context, but a layer, where it's spent. The combination of mem-search skills fixes the search process in three steps, avoiding Agent re-engineering every time. The dual storage division of labour is worth saying. SQLite regulates structured facts and indices, which observations occur at which session, which project, and what type, and which type of queries are the fastest in the relationship library; Chroma is semantic similarity, asking "how did the cross-domain issue last time work out" and looking by meaning rather than by keyword. The two layers of the tube avoids the slowness of the time metadata search on the vector bank alone and the symmetrical search on the relationship library alone.
It's not just an interface. It starts by printing a local address, opening the My Work page, where real-time requests, processing progress, and handover items for your review are listed. The memory is in the backstage, and you can see what it has, and this transparency is important for the people who just got it, or you'll never know if it remembers it.
The retrieved historical observations are numbered, and Agent can be numbered when citing a previous conclusion, a design called a reference that allows you to go back and check the last time it said. The local viewer can see real-time requests, processing progress and hand-over queues, and the team scene has another shared workspace, but the individual requests and evaluate notes are left locally by default. There is another detail for the team scenario: each conclusion in the shared workspace is signed by its members, and it is clear who contributed something. Requests and notes in personal space are not automatically synchronized, and sharing is a visible, not a default.
Three other ways to survive the same track.
The memory isn't just a compressed summary road. Put the four items on this list together, and the difference in design can be seen at once.
There are also differences in open source agreements. Claude-mem and Hindsight have chosen Apache-2.0 or MIT to embed their products without barriers; Learn Harnesse of the teaching class has chosen AGPL-3.0 and business will have to be measured. The memory layer is about living in the deepest part of your development process, and the degree to which the protocol is more friendly than the functional list determines whether it can enter the network.
Claude-mem notes were compressed, and context was omitted. MemPalace went to another extreme, stored word-to-word conversations, searched back and forth, and the phrase was all left but more retrieving, and it had only 357 stars on the Python day list that day, with a small order of magnitude. Hindsight has abstracted the operation into three verbs: retention, recall, reflection, and RAIDME says that its LongMemEval scores were repeated by researchers from Virginia Science and the Washington Post, while acknowledging that the figures of other manufacturers in the chart are self-reported. Mem0 adds only those that do not cover old memories, and its benchmark results indicate that it includes hosting platform optimization and that open source SDK does not necessarily recur.
This comparison is an honest reminder: three of the four families quoted LongMemEval in README, but basically self-reported data. It's not just about the score, it's about the storage model. To use word-by-word language, save token to compress, and select more Agent sub-registers for the type of object-separated Hinsight design. One easy point to ignore: the business model of the four projects is almost the same, with open source warehouses free of charge and hosting fees. The number of stars measures the degree of concern, not the installed amount, much less the retention. When choosing, use the number of stars as a clue, not as a conclusion.
The three pits you need to know.
The first pit is installed. The npm install-g claude-mem loads only SDK and library, hooks don't register, and worker doesn't start. The correct entry is npx claude-mem install, or take the plug-in market in Claude Code. The false act is quiet: orders are in place, nothing is in mind, and many people think they're ready.
The second pit is in the account number. The installer will guide you to the server that logs in to claude-mem, the mail box's magic link, without a card, for 30 days. Remembering the hosting channel during the trial period, the official word is it's not your Anthropic package quota. Automatically returned to your Anthropic package after trial. If you do not want to log in, the --provider parameter specifies the key of OpenRouter or Gemini itself, you can also set the CLUDE MEM ONLINE OPTIN to skip the entire online process for false, and CI, which is a non-interactive environment, will not be recorded by default.
The third pit is at the privacy border. The memory system defaults on the continuous recording of tool behaviour in the back and sensitive content is explicitly excluded. claude-mem uses the pointy brackets pirvate label, and the enclosed paragraphs are not stored. The size of the context injected in the file is checked to determine which items are to be recorded and which ones are not. The fourth is to restart. The plug-in must be restarted to take effect. The hook is registered at start-up. A lot of people pretend to have failed, but they just didn't start. OpenCode documents emphasize this separately, and more than 1.3.4 versions are supported, as is OpenCode 2.
Five orders running through.
Take Claude Code, for example, the complete links are these.
# Mode I: Plugin market, recommended
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
# Mode 2: command line Installer
npx claude-mem install
# Skip the online login, completely control
npx claude-mem install --provider host
Loads the restart of Claude Code, the last round of contextes will appear automatically. To confirm that memory is working, the local viewer addresses printed on start-up are on that page. OpenCode requires a version not less than 1.3.4, OpenCode 2 is also on the support list, and is also loaded to restart. The Grok Bot is the other way, the host has no hook, claude-mem is changed to a chat log file. There is a stupid but reliable way to validate memory: In a new session, he deliberately asked for details about the previous round, such as "where's the last configuration?" to see if he could give a numbered quote. It can be given that the whole chain of capture, compression and retrieval is open; it can't be shown whether to go to the viewer to see if the library is down or the search is dead, and the two types of problems are completely different.
How long will this memory heat last?
Several signals deserve attention. The two-week list actually tells the same story. Most of the projects are not new Agent, but spare parts for your running Agent: skill files, memory layers, teaching shell. The CleanYourTV project of over 40,000 stars is basically using the code Agent as a universal installer. The ecological prosperity of the parts means that Agent's body has stabilized, and people are starting to fold up.
On the demand side, AI Memory is up 35% in 10 days, Superpowers, a skill set of 1255 stars on a single day, with a total of 309,155 stars, and the tools for Agent's capacity are all rising. On the side of the caliber, the robots.txt of GitHub clearly stopped Trending's weekly and monthly charts, and the third-party list would then rely on the real number-of-star window of the new warehouse, which would become more difficult to compare. On the side, the baseline score for the memory project is now self-reported, and the kind of re-emergence of the outside agencies in Hindusight would have a strong basis for selection.
My judgment is that the gap between the conversation is the footiest stone in Agent's experience, and that the outer memory layer will continue to be needed until the model's long-term memory matures. 100,000 stars don't mean claude-mem is the end, it just means this track has been tested. Play a run for two weeks, see if your own screech costs are down, better than any list.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.