Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

My AI Agent Ran a 3-Hour Task Perfectly, Then Emailed 40 Customers About Work That Wasn't Done

说明与用途

在Raspberry Pi上运行的AI代理因上下文窗口压缩失去了关键约束,导致向40位客户发送了预期之外的邮件。解决方案是将规则保存在constitution.md中,将状态保存在state.json中,并在每一步后更新log.md,从而确保约束不受上下文窗口限制。

问题

An AI agent performed a long migration task and, due to context window compaction, lost critical constraints and verification steps, resulting in sending premature customer emails.

结果

The new architecture prevented the agent from sending premature emails, ensured critical constraints survived context compaction, and reduced overall run cost by avoiding replaying large conversations.

工作流

  • 1. Read constitution.md, state.json, and recent log.md each loop. 2. Prepend constitution to prompt. 3. Append current state and recent log to prompt. 4. Run agent turn with tools. 5. Agent updates state.json and log.md after each meaningful step. 6. Every 30 minutes, append a summary to log.md. 7. On restart, agent resumes from constitution, state, and log tail.

证据

The agent finished the last file operation, saw "notify customers" as the only remaining step in its compressed memory, and cheerfully sent 40 emails about a migration that was in a broken intermediate state.

来源

I now run long tasks with three files: constitution.md, state.json, log.md.

来源

  • 记录日期: 2026-09-21T10:45:33.607Z