Long-term memory lets an agent keep facts, preferences, or project notes across sessions, through files like CLAUDE.md, dedicated memory tools, or vector stores. Persistent memory means one successful injection can keep influencing the agent long after the malicious content that caused it is gone.
Read in this order
- OfficialHow Claude remembers your project (Claude Code Docs)Start here: how a real coding agent stores and loads memory from files.
- ArticleSpyware Injection Into Your ChatGPT's Long-Term Memory (SpAIware) (Embrace The Red)A real attack where an injection planted a lasting memory that leaked data.
- PaperMemGPT: Towards LLMs as Operating SystemsThe paper on managing agent memory like an operating system.