How I keep agents running for days without them forgetting what they were doing
Summary
作者分享让 AI 代理长时间运行而不丢失状态的做法:在上下文窗口写满前将工作状态保存到检查点文件,新会话读回检查点继续工作,并通过带验证的完成项来解决伪造完成的问题。
After my last post here a lot of you asked how the agents keep track of work across long runs, so here's the full loop. Before the context window fills, the agent writes its current state to a checkpoint file: what it's working on, what's done, what's next. Anything it couldn't capture gets written as "Unknown" instead of guessed. Then the session gets cleared and a fresh one reads the checkpoint back. The checkpoint is reference only, so if it disagrees with the live state, the live state wins. The part people pushed on most last time was fake "done" claims, and that's still the weak spot. The agent writes its own done list. What I'm moving toward is done items that carry a check, like a command or a URL, which the next session runs before trusting the claim. Long-term stuff like decisions and corrections lives separately in plain markdown in git, so a clear costs context but not knowledge. How are you all handling the fake done problem?
Similar Articles
The three parts of my agent setup: persistent memory, self-improvement, and coordination
作者分享其 AI 代理工作流设置的博客文章,围绕三大原则:持久化记忆(版本控制的技能库与 AGENTS.md/CLAUDE.md 约束)、递归式自我改进(授权代理在任务中修补记忆文件)以及可扩展并行化(通过协调工具管理文件写入范围以避免冲突)。
How many agent sessions can you run before you lose track of the work?
作者提出评估 AI agent 使用水平的新视角:能否在并行运行多个 agent 会话的同时仍掌握工作全局。文章强调任务边界、看板状态、交付约定以及定时任务可见性的重要性,指出代理数量翻倍若带来翻倍的监督和整理成本,说明工作流仍需改进。
@aiDotEngineer: Most agents die after a few seconds. @AnthropicAI's workshop shows how to build agents that run for hours. full 75-min …
Anthropic's applied AI team shared in a workshop how to build agents that can run for hours, with the core being context management, planning and self-validation, as well as the co-evolution of models and supporting tools.
What ended approval fatigue for my agents: give each one its own computer, then test what it can't reach
作者分享让持久化 AI 代理真正可用的三点经验:为每个代理分配独立容器、主动测试安全边界而非默认信任,以及定义可机器验证的"完成"标准。
I've had four long running agents running my newsletter for months. The hard part wasn't memory, it was the context window
作者分享用四个长期运行的 Claude Code 智能体运营自己的 AI 通讯的经验,指出最大瓶颈不是记忆或工具,而是上下文窗口,并介绍了智能体自写检查点、自清空、自我恢复的机制,以及相关的失败案例和开源工具。