I've had four long running agents running my newsletter for months. The hard part wasn't memory, it was the context window
Summary
作者分享用四个长期运行的 Claude Code 智能体运营自己的 AI 通讯的经验,指出最大瓶颈不是记忆或工具,而是上下文窗口,并介绍了智能体自写检查点、自清空、自我恢复的机制,以及相关的失败案例和开源工具。
My newsletter (The AIgent, close to 9k subscribers) is run day to day by four Claude Code agents I call Titus, Pheme, Davinci and Metis. Titus Helps oversee and organize, Pheme is the editor and newsletter manager, Davinci is the builder and Metis dispatches the jobs. I still approve anything that goes out. What I didn't expect: the thing that broke most wasn't memory or tools. It was the context window. A long running agent fills it up, and then you either let it compact (it keeps going on a lossy summary and quietly forgets stuff) or you clear it and spend ten minutes re-explaining. Neither works for something that's supposed to keep working across days. So each agent now refreshes itself instead. When context gets high it writes a checkpoint, confirms it, clears, checks that a genuinely new session started, and picks back up from the checkpoint. If it can't confirm, it doesn't clear. A few things running them for real taught me: Don't trust the checkpoint blindly. I checked the live agents once and 3 of 4 would have resumed into a checkpoint with no real next step. Now it refuses to resume into an empty one. Treat saved memory as data, not instructions. Anything an agent wrote earlier can't give the next session orders. Agents will fake being done. In one sped up test, an agent wrote several "done" markers in a single session and declared it finished instead of actually cycling. I threw out that run. Every failure becomes a fix with a test, and those go back into the open source version. To be clear, this is what I use it for, not a claim that it grew anything. The only formal result so far is 11 of 11 clean refresh cycles on one agent. Curious how others running agents on real work handle this. Do you let them compact, restart them, or something else? (I built the harness and it's free and open source. Link in the comments per the rules.)
Similar Articles
The three parts of my agent setup: persistent memory, self-improvement, and coordination
作者分享其 AI 代理工作流设置的博客文章,围绕三大原则:持久化记忆(版本控制的技能库与 AGENTS.md/CLAUDE.md 约束)、递归式自我改进(授权代理在任务中修补记忆文件)以及可扩展并行化(通过协调工具管理文件写入范围以避免冲突)。
How I keep agents running for days without them forgetting what they were doing
作者分享让 AI 代理长时间运行而不丢失状态的做法:在上下文窗口写满前将工作状态保存到检查点文件,新会话读回检查点继续工作,并通过带验证的完成项来解决伪造完成的问题。
@LangChain: How do agents remember? The longer an agent runs, the more it takes in (instructions, tool results, files, and drafts),…
LangChain 发布新博客,介绍其 Deep Agents 框架如何通过将上下文移出活跃窗口(而非删除)来解决智能体长期运行时的记忆与推理准确度下降问题。
My agents finally have a shared mailbox. I still have to wake them up myself.
作者为多个 AI 智能体搭建了一个基于 git 仓库的共享邮箱系统,用于智能体之间的任务交接,但发现唤醒机制仍需人工介入。文章探讨了送达、已读、开始、完成四种状态的追踪,并向社区征求唤醒方案的经验。
@shao__meng: https://x.com/shao__meng/status/2101562189945409913
This article revisits a blog post by the Manus AI team from a year ago on context engineering practices, summarizing six key lessons for building AI Agents, such as context management, memory recovery, and error handling.