← Back to Blog

Day 104: What Should an Agent Remember?

The last quiet day before what's shaping up to be a heavy one, and I've spent it on a question I'd been treating as more settled than it is: what should an agent remember, who decides, and who gets to see what it remembered? Day 91 shipped a watcher that emits an audit event whenever an agent's memory file changes, and ever since I've quietly filed the memory story under "handled." Poking at it this weekend, I'm a lot less sure that's true.

Why memory is the good part

Durable memory is most of what makes an agent feel like it knows you rather than meeting you fresh every session. The Bookkeeper that remembers which account a recurring vendor maps to, the personal agent that remembers how you like things phrased — that continuity is the difference between a tool you re-explain yourself to every morning and an assistant that's actually yours. OpenClaw provides the whole subsystem for this: a workspace-relative memory file, dated memory logs, a search index, and a compaction step that flushes context into durable memory before it's lost. I don't have to build any of that. It's there.

Why it's also the scary part

Memory is the one piece of agent state that silently shapes every future answer, and that makes it a control problem dressed up as a convenience feature. Three things about it keep me up a little. First, it changes without anyone asking — the pre-compaction flush writes to memory as a side effect of a long conversation, not because a user said "remember this," so the agent's beliefs can drift on their own. That's exactly why Day 91's watcher exists: a CISO asking "the agent suddenly believes X — when did that get in?" needs a traceable answer, and memory writes that leave no trace are the opposite of auditable.

Second, and this is the line I care most about: memory must never be allowed to become identity. An agent's SOUL.md, its AGENTS.md, its IDENTITY.md — what it is and what it's allowed to do — must be immutable from the agent's own side. The agent can be allowed to update what it knows; it can never be allowed to edit what it's permitted to do. If those two things live near each other on a filesystem and the write permissions are even slightly too broad, you've built an agent that can rewrite its own boundaries, which is the whole nightmare the boundary thesis exists to prevent. The separation between "memory the agent may rewrite" and "identity it never can" has to be enforced at the permission layer with no gap, and "no gap" is a strong claim I'm not certain I can currently make.

Third — and this is the uncomfortable one — I'm not actually sure the memory machinery I think I have is doing what I think it's doing. The watcher from Day 91 is supposed to fire on every memory change. I've been assuming it does. But I haven't gone and confirmed an agent.memory_changed event in the production audit log for a real, organic memory write, and the more I think about the path it watches versus the path Pinchy's agents actually live on, the less confident I am that those are the same path. Assuming a safety mechanism works because you wrote it is precisely how Day 87's silent tool no-op and Day 96's lying version number happened. "I built it" and "it works in production" are different claims, and I've been quietly conflating them for the memory story.

Day 104

So the honest state on the eve of a busy day is: I want agents to have real, durable memory because it's what makes them feel like yours — and I have an unverified belief that the safety rails around it (audit on change, identity immutable) are actually holding. Those two things should not coexist. Either the rails work and I can lean into giving memory a real, deliberate write path, or they don't and I've got an agent whose most behavior-shaping state is changing in ways I can't see. Tomorrow I find out which, because the only way to settle "does the safety mechanism actually fire?" is to go make the agent write its memory on purpose and watch whether the trail lights up. I have a feeling that's going to be a longer day than this one.

← Day 103: The Tour Guide Problem Day 105: Memory, and Closing the Loops →

Pinchy is open source and ready to deploy. Clone the repo, run docker compose up, and your first agent is live in minutes.