My Agent's Memory Only Grows. Here's the Weekly Fix.
My agent's memory only ever grew, so I built a weekly no-agent cron that turns seven days of messages into a ratify-it-myself candidate report.
TL;DR
The author audited their agent's memory files and found everything only accumulates, never gets pruned or corrected. ChatGPT and Letta solve this with out-of-band batch synthesis, so the author built a weekly Python script that generates a candidate report instead. They insist on manual ratification since a single fabricated entry could poison a single-agent setup.
Last week I opened the memory directory of my personal agent and did an inventory. One flat markdown file for preferences. A fact store for project facts. Session search over old transcripts. All three only ever grow. Nothing gets marked stale, nothing gets deleted, and a correction I made in March lives right next to the thing it corrects.
OpenAI admits the same failure in their own Memory FAQ. The old saved-memories system, they write, "often became stale and relied on users to manually manage updates", and their example of the contradiction is almost embarrassingly familiar: "I am training for a marathon" sitting next to "I sprained my ankle" [1]. My memory had plenty of marathons.
My first guess at the fix was the one every developer reaches for. Real-time RAG. Re-inject recent chat history into every prompt. Something streaming, something that intercepts the context before each turn. That guess was wrong in an instructive way.
What ChatGPT actually does
None of that. ChatGPT synthesizes memory out-of-band, on its own schedule, then injects the result statically into new sessions. No retrieval layer judging each prompt. No history replay. The new system updates memories automatically in the background, away from the conversation [1].
And the pattern is now official elsewhere too. Letta, the company formerly behind MemGPT, ships it as a feature called **Dreaming**: "background subagents review recent conversations, consolidate useful lessons, and update memory without interrupting your active work", triggered after N agent steps or when the context window gets compacted [2].
Small funny detail. A few days ago my research dossier logged "Dreaming" as community hearsay and threw it out for lacking an official source. It is now in the docs. Hearsay has a short half-life.
The contrast case is Mem0, whose docs are refreshingly honest: their memory behavior is ADD-only. Memories accumulate. Housekeeping is nobody's default [3]. Which matches what I saw in my own setup, and matches what almost every self-built memory system does.
Why batch synthesis wins
Once I saw the shape of it, the reason was obvious. Synthesis is cheap batch work, done when nothing is waiting on the answer. What I actually need from memory is that it is less often wrong, not that it is retrieved faster. A stale entry retrieved in zero milliseconds is still stale.
What I built
So I wrote sintesis-mingguan.py. One hundred seventy-eight lines of Python, cron-triggered every Monday morning, running in no_agent mode so the schedule itself burns zero LLM tokens. The flow: read the sessions database read-only, pull user messages from the last 7 days across the tui and discord sources, drop slash-commands and injected system messages, truncate each message to 300 characters, cap 25 messages per session, cap the whole digest around 55k characters. Then the digest plus current memory contents go to Qwen through the free Camofox browser lane, after a preflight doctor check. Exit contract follows the async pattern I already use elsewhere: 42 means queued, the answer gets pulled by polling.
The important part is what the output is not. It is not final memory. It is a candidate report, max 12 entries in three categories. A: new durable facts or preferences not yet covered. B: old entries now contradictory or stale, with reasons. C: things explicitly not worth recording, which is my anti-hallucination tripwire, proof the model actually filtered instead of inventing.
Phase 1 is report-only. Nothing writes itself. I read the report, ratify entries manually, and only then does Hermes write.
Here is the opinion part, and I hold it firmly. **Auto-writing memory is a trap.** ChatGPT and Letta can afford full-auto because their products absorb the mistakes; a bad entry gets diluted across millions of users. My single-agent setup has no such buffer. One fabricated entry, one "user prefers X" that I never said, poisons every later answer and I may not even notice where the rot came in. The vendors scaled past that failure mode. I have not.
So: report first, ratify after. It costs me two minutes on Monday morning, and in exchange nothing enters memory that I did not see. Maybe I flip to auto later, if the error rate stays at zero for a few months. The design leaves that door open without promising anything.
The first report lands next Monday morning. I expect the category-B pile to be big, and for once I am looking forward to deleting things.