MEMORY.md and the Daily Logs
In March you tell your agent that your passport expires in November and you want a reminder in October. Whether that survives until October depends on where the fact ends up. OpenClaw has two kinds of memory file, and they do different jobs.
The rule
MEMORY.md keeps lasting facts; the dated files keep the diary.
MEMORY.md is a persistent file in the workspace where the agent writes down important things it has learned over time, and keeps them up to date. It is how the agent recalls a fact months later. USER.md is what you tell it about yourself up front; MEMORY.md is what it picks up along the way. Both are plain markdown, so you can read and correct them.
memory/YYYY-MM-DD.md files are dated logs, one per day, such as memory/2026-09-26.md. Each records what happened that day, giving the agent a history it can look back through in order. You do not write these yourself: the session-memory hook creates them, and it runs when you use /new or /reset, saving the session before the reset.
A few commands let you look inside and protect all this:
openclaw memory search "passport" # search what the agent has stored
openclaw memory index --all # rebuild the search index for every memory file
openclaw backup create # snapshot of your configuration and memory filesIf a search misses something you know is in the files, rebuilding the index is the first fix. Before a risky change, such as a big config edit or an upgrade, make a backup.
The shortcut
Ask one question: "Will this still be true next month?" Yes: MEMORY.md. If it is just what happened today, it belongs in the day's dated log.
"My passport expires in November 2027."
Still true next month, so MEMORY.md.
The trap is assuming the agent remembers everything it was ever told. A fact is reliably remembered only once it is written to a file. When something matters, ask the agent to note it in MEMORY.md, then confirm with a quick search.
Drills
Answer fast — trust the rule.
What is the daily log for 5 March 2027 called?
What creates the dated memory files?
Which chat commands trigger the session-memory hook?
During a chat the agent learns that your car insurance renews every April. Where does a lasting fact like that belong?
Search keeps missing memories you know are in the files. Which command rebuilds the index?
Remember
- MEMORY.md keeps lasting facts; the dated files keep the diary.
- Ask "will this still be true next month?" Yes means MEMORY.md.
/newand/resettrigger the session-memory hook; search, re-index and back up from the CLI.
