How ChatGPT Memory Really Works Across Sessions
ChatGPT memory is not a real-time summary of your sessions. I break down the real mechanism: periodic synthesis, system prompt injection, and the privacy cost.
TL;DR
ChatGPT doesn't scan your chat history with RAG. Instead, it periodically synthesizes your conversations into a static profile injected into every new session's system prompt, including roughly your last 40 typed messages. Since deleting one chat won't erase derived insights, treat memory as a managed archive, not a perfect record.
Last week I asked ChatGPT something trivial: a preference I had mentioned once, in passing, a month earlier. Without me repeating it, the answer picked up right where that old chat left off. My first guess was that it summarizes every session in real time, some giant RAG (Retrieval-Augmented Generation) scanning my entire history with each message. After digging through OpenAI's official FAQ and a security researcher's reverse-engineering, that assumption turned out to be wrong. The mechanism is simpler, cheaper, and has privacy consequences that deserve more attention than they get.
OpenAI defines ChatGPT's memory as a continually updated synthesis of context from your past chats [1], not a list of items it rereads. The system has two layers: saved memories, explicit facts you can audit one by one, and chat history, insights inferred from your conversations, which rolled out to all users on April 10, 2025 [2]. That second layer has no fixed list you can open; this is exactly where the "it summarizes all my sessions" assumption falls apart.
Not real-time retrieval, but a system prompt injection
Security researcher Johann Rehberger tested the RAG hypothesis directly: the model cannot retrieve topics from old chats on demand [3]. What happens instead is the reverse. Your profile is synthesized periodically in the background, and the result is injected as static text into the system prompt of every new session [3]. In his reverse-engineering, that block is split into six sections: Model Set Context (timestamped saved memories), Assistant Response Preferences (the reply styles you prefer), Notable Past Conversation Topics (big themes from months ago), Helpful User Insights (profession, location), Recent Conversation Content, and User Interaction Metadata [3].
Recent Conversation Content is the most revealing: it holds roughly the last 40 conversations, and only the messages you typed, no ChatGPT responses, separated by a dedicated marker [3]. As engineering, this makes sense. Searching your entire history in real time would be massively expensive and slower to answer; periodic synthesis plus a short recent window keeps the context window light. OpenAI itself admits the old list-style memory system "often became stale" because it relied on manual updates [1].
The privacy trade-off
Because memory is a synthesis, deleting one chat does not delete the insight derived from it. The official FAQ is blunt about this: to truly remove something, you must delete every source where it appears, including archived chats, files, and the memory summary itself [1]. There are technical risks too: hallucinated memories can land in Model Set Context [3], and persistent prompt injection is a proven attack; the 2024 SpAIware case showed malicious instructions from external content sticking around across sessions until it was patched [3]. The only mode that neither uses nor creates memories is Temporary Chat [1].
You can build the same pattern yourself
The practical part of this research: the same architecture ships as open source. Letta (formerly MemGPT) offers tiered Core/Recall/Archival memory, Mem0 does passive extraction with vector search, and Graphiti builds a temporal knowledge graph. The shared pattern matches the findings above: memory tiers, periodic synthesis instead of raw storage, and explicit retrieval when needed. For your own assistant, this beats imagining a giant RAG over full chat history, the same lesson I learned while building a three-layer memory system for my own agent.
AI memory is not magic; it is an engineering trade-off between cost, consistency, and privacy. Knowing that what it "remembers" is only a periodically refreshed static synthesis changes how you should treat it: not an entity that remembers everything, but a dynamic archive you manage deliberately, especially when you build the system yourself.