Use an .agent/ directory. Tell it to keep a task list, a plan, findings, wishlists, future prompt ideas in there. I use it so much I have ".agent/" in my .gitignore template already. Tell it to use meaningful file names and to set the status of the memory using uppercase suffixes (and category as prefixes or subdirs), and you end up with...
.agent/task-cleanup-code.DONE
.agent/memory-function-style.md
.agent/prompt-remove-dead-code.md
.agent/symbols-map.toml
...
The agent will scan that directory every once in a while and look for information before making a decision. Granted, this is not a vectorial or graph search, it's a ripgrep regex probably, but the model can extrapolate and search many times for related words if needed.I can't think of an analog for the "don't delete tools" one though.