An AI agent that forgets yesterday’s conversation usually has one of three problems: the conversation was not saved, saved history was not brought into the next run, or older details were removed or summarized to make room in the active context. Fixing the problem means identifying which step failed—then deciding whether the agent needs a transcript, a compact long-term memory, or both.
Why does an agent forget between runs?
“Memory” can refer to different parts of an agent’s system. The model’s current context is the information available to it during a run. A stored conversation history is data kept outside that context. A persistent memory is usually a separate mechanism that selects useful facts or lessons and retrieves them for later runs. These are related, but one does not guarantee the others.
As an Amazon Associate I earn from qualifying purchases.
The previous conversation was not persisted
If a run ends without saving its turns—or the next run starts with a different session or storage backend—the agent may have no transcript to consult. OpenAI’s Agents SDK sessions can retrieve conversation history and append new turns for later runs when the same session and backend are reused. See the Agents SDK sessions documentation.
History exists, but relevant details were not retrieved
Keeping a transcript does not automatically create a concise, reusable memory. The system has to select relevant information and make it available in the next run. OpenAI’s agent memory documentation describes extracting and consolidating selected lessons into files, a distinct process from maintaining session history. See Agent memory.
#1 Best Overall
The active context was trimmed or summarized
The model can only work with information included in its current context. As a conversation grows, an application may compact or summarize earlier content, or remove stale tool calls and results. This is context management, not the same as saving long-term memory. Anthropic documents context editing alongside a separate file-based memory tool in its context management guidance.
What kind of memory does your agent need?
Choose the mechanism based on what “remember” means for the task. A transcript supports continuity and auditability; selected facts are easier to reuse across many runs; context compaction keeps the current run manageable. Some agents need more than one.
Rank #2
| Need | Useful mechanism | Key question |
|---|---|---|
| Continue a conversation across runs | Persisted session history | Does the next run reuse the same session and backing store? |
| Recall a small set of preferences, decisions, or lessons | Extracted and retrieved persistent memory | How are facts selected, updated, and injected when relevant? |
| Keep a long current run within context limits | Compaction or context editing | What gets summarized or removed, and can important details be recovered? |
OpenAI’s developer article on building reliable agents with memory and compaction discusses context, memory, and reviewed artifacts as distinct design concerns.
How to diagnose and fix the problem
- Check whether the prior turns were saved. Confirm that the application writes the conversation to durable storage rather than keeping it only in process memory. For SDK sessions, verify that later runs reuse the same session identifier and backend.
- Check whether the next run loads them. A database full of history does not help if the agent starts without retrieving the relevant turns or facts. Inspect the prompt or context supplied to the run and confirm that retrieval happens before the agent answers.
- Decide whether to keep a transcript or extract durable facts. Use session history for conversational continuity. For cross-run facts, add a deliberate extraction and retrieval step; do not assume the full transcript will serve as a useful summary.
- Review context management. If details disappear during a long run, inspect any truncation, summarization, or context-editing behavior. Keep important state in a recoverable store rather than relying on the active context alone.
- Plan for corrections, staleness, and deletion. Let users amend or remove stored facts, and define how conflicting information is handled. Treat retrieved memory as guidance, not unquestionable truth: the Agents SDK documentation warns that memory can become stale and says to trust the current environment when it conflicts.
What happens when the storage is replaced?
Persistence depends on preserving the storage that holds the memory. OpenAI’s Agents SDK memory documentation notes that a fresh, empty sandbox starts with empty memory. To carry memory forward, a system must preserve and reuse the relevant memory directory, session state, snapshot, or mounted storage. The exact mechanism depends on the application’s architecture.
Rank #3
Can you trust an agent’s saved memory?
No memory mechanism guarantees complete or correct recall. A stored transcript may be too large to include in full; a summary may omit a detail; selected facts may be outdated; and retrieval may miss what matters. OpenAI’s ChatGPT Help Center puts the limitation plainly: “Memory does not retain every detail from every conversation.” ChatGPT is a consumer product example, not a specification for every developer-built agent. Its memory sources and controls may vary by plan, region, platform, and workspace settings. See Memory in ChatGPT.
Keep memory reviewable
For consequential tasks, make durable memories visible and correctable, record when facts were added or changed, and prefer current authoritative data when a stored note conflicts with it. OpenAI’s Help Center also cautions that deleting a chat alone may not delete a separate saved memory; saved memories and their source content have distinct controls.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What reported performance results do—and do not—show
Published evaluations can indicate that memory or context-management techniques help on a particular task, but they are not guarantees for every agent. Anthropic reported that combining its memory tool with context editing improved performance by 39% over baseline on an internal evaluation set for agentic search; it reported a 29% improvement for context editing alone. Those are Anthropic’s internal results, not a universal benchmark. Details appear in its September 29, 2025 context-management article.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsThe authors of a 2025 Mem0 paper reported a 26% relative improvement on an LLM-as-a-Judge metric over the compared OpenAI system, along with other results on their evaluation setup. These paper-reported comparisons do not establish how a different workload, implementation, or dataset will perform. See the Mem0 paper.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




