Hacker News
points by underdeserver 18 hours ago | 0 comments
This is bananas!

One thing he doesn't mention is memory. What happens when the context runs out? How do agents preserve state and what are they continuously being prompted with?

[–] bradknowles 4 hours ago
So, one of the rules I came up with and put into all of my Claude.md files is that after discovering any piece of information, and before doing anything else, that information has to be written to local file storage. That local file storage is then re-read any time the session is compacted or the main process starts up again. Agents may not need this information, but the top-level process does.

And this is on a per-task basis, so we are not polluting the memory of one top-level Claude process with the data from another.

This method should survive all compaction, and allow me to go back and revisit any previous task that I’ve worked on with Claude.

I also have a rule that any important lessons learned also get recorded into the Claude.md, for the benefit of future tasks.

Hacker News