A Memory Hole That Blew Up at Dawn
Key point
The overnight memory feature worked well, but it exposed weaknesses in memory protection, verification, and write methods.
Details
While running OC on a Mac mini, after turning on 4.5's dreaming, I found in the morning that DREAMS.md was connecting project decisions made 3 days apart.
Previously, I had to manually select what went into long-term memory, which took a lot of effort, but dreaming started taking over part of that role.
However, 3 weaknesses also surfaced during operation.
-
MEMORY.md getting overwritten during the day
- There was an issue where the agent would clean up overnight-promoted entries the next day using the
edittool, deleting 2 of them in the process. - As a solution,
chmod 444was applied to core bootstrap files, and an append-only rule was applied to memory writes. MEMORY.mdwas left at 644 so dreaming could keep writing to it, while the agent's edit permissions were restricted.
- There was an issue where the agent would clean up overnight-promoted entries the next day using the
-
No way to verify whether overnight work actually completed properly
- Since dreaming runs at 3am and the user wakes up at 7am, it's hard to immediately know whether all 3 stages actually finished.
DREAMS.mdhad to be opened directly to check, and to address this, a cron check that runs before dreaming was added.- It checks file size, configuration, and whether the daily log exists, catching problems in advance that would otherwise only be discovered days later.
-
The quality of daytime logs determines dreaming quality
- When editing daily logs with the
edittool, exact string match would break, corrupting entries. - Switching this to append-only write made daily notes much more stable, and improved the material available for dreaming's light phase.
- On top of this, proactive
/compactwas set at 60% to avoid emergency compaction, andmemoryFlushsecured time to save before compaction.
- When editing daily logs with the
Additionally, by fixing the morning boot sequence and creating a roughly 500-token summary card loaded into the system prompt instead of re-reading all files, token usage dropped significantly from about 262k to under 12k.
This structure has been organized at github.com/aristotle-agent/aristotle, though it hasn't been published to npm yet. Lastly, the biggest remaining question is how to protect MEMORY.md more cleanly.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.