I got tired of telling every coding agent the same thing twice.
Built a local memory store shared by Codex, Claude Code and DeepSeek. They recall the preferences and lessons across sessions. New lessons go through a review before becoming shared memory.
https://t.co/I7weumm9DY
1/ How recall works
How recall works: at session start a hook injects one view (max 9.5K chars): pinned core rules, this project’s memories, and a one-line index of the rest. Mid-task the agent queries by keywords and gets back up to 5 matching memories in full. No embeddings.
1/ How recall works
How recall works: at session start a hook injects one view (max 9.5K chars): pinned core rules, this project’s memories, and a one-line index of the rest. Mid-task the agent queries by keywords and gets back up to 5 matching memories in full. No embeddings.
4/ Where lessons come from
Where lessons come from: when the user corrects an agent, the session files an “observation”. Observations are never recalled. A dream pass checks each against the user’s own words, then keeps, merges or drops it. Agent guesses don’t count as evidence.
@clementrog Agent will recall all those related memories and work on the given task according to those memories. Memories can be anywhere from “do this” to “have we seen this before? What is our decision” or “I got burnt by this before, this is a lesson i learnt last time”.
@clementrog So far most of my agent memory recalls are along this line “do we have any memories related to this”. For example, if I ask “please help me work on STM32 project. Get a team”. The agent will then look in the memory to see if we have any memory related to STM32, leading a team.
Here is my schedule dream setup and one of the dream transcript. There is no right or wrong way to set up the dream. Just ask the agent to set up a dream for you (using agent-dream skill) and customise to your needs.
I got tired of telling every coding agent the same thing twice.
Built a local memory store shared by Codex, Claude Code and DeepSeek. They recall the preferences and lessons across sessions. New lessons go through a review before becoming shared memory.
https://t.co/I7weumm9DY
@JiaShen_AI That’s a good idea. Currently, there is a boundary between memories, global memories and memories scoped to projects. And agent can vote if a memory is useful or not after a recall. Think of it as a voting system. Those higher score memories become long term memories.
This concept is also explained by Antropic. They have API for this but mine is fully local. You can use tailscale to host centralised dream store that can be accessed from multiple devices.
@its_josii Yes, it is very important. Even if bad lessons become memories, you can always tell the agent to forget about it. The more you work with the agent, the better it becomes.
@xingzhounotes You can also tell the agent anytime during the session. “This is my preferences/preferred way” or something like that during the dreaming process, those preferences will become memories.
@xingzhounotes Agent will do both. This is also part of your preference and part of the memory. For me I set up a schedule called agent-dream every night. During that dream, agent will perform self-reflection to all of its actions throughout the day. Also perform ranking of the memories.