When an AI remembers a detail in one chat but loses it in the next, several different systems may be involved. The model did not necessarily “forget” in the human sense. The application may not have supplied the old conversation, a memory feature may have been disabled, retrieval may have missed the relevant source, or a privacy policy may intentionally prevent reuse.
This article is the technical troubleshooting guide: it explains the layers, provides a reproducible test, and maps each failure to a fix. The related article Why Your AI Forgets You Every Session owns the productivity impact and tool-selection question. Keeping those responsibilities separate avoids treating every continuity problem as the same kind of memory failure.
Five layers that people call “AI memory”
| Layer | What it does | Typical lifetime | Common failure |
|---|---|---|---|
| Context window | Holds the tokens available to the current model call | One request or active conversation assembled by the app | Older material is omitted or compressed |
| Session history | Stores messages so an application can reopen or resend them | Until deletion or retention policy | New chat starts without that history |
| Saved memory | Stores selected preferences or facts for reuse | Across chats until changed or deleted | Detail was never saved, is stale, or is not selected |
| Retrieval | Finds relevant files, messages, or records at runtime | Per query | Wrong query, permissions, indexing, ranking, or version |
| Durable project state | Records decisions, artifacts, progress, approvals, and external IDs | Across sessions and workers | State lived only in prose or was not checkpointed |
These layers can coexist. A product can retain chat history but not use it in a new conversation. It can use saved preferences but not reopen an old project file. It can retrieve a document while missing the decision made after that document was written.
Context windows do not create cross-session memory
A language model produces a response from the input assembled for that invocation. That input can contain instructions, recent messages, files, retrieved passages, tool results, and memory supplied by the application. The context window is the capacity for this assembled input and output; it is not a database that the model carries into a future session.
Within a long conversation, the application may stop sending older messages, summarize them, or compact the history to remain within the available window. Even if the window is large enough, relevance and attention still matter: including a fact does not guarantee the response will use it correctly.
The practical consequence is simple: a larger context window can reduce truncation inside a task, but it does not decide what persists after the conversation closes.
Session history is storage, not guaranteed recall
If a chat appears in the sidebar, the application has stored enough data to reopen it. That does not mean every new chat automatically receives every previous message. Doing so would be expensive, noisy, and often inappropriate.
A useful distinction:
- Resume the same conversation: the app can resend or summarize its history.
- Start a new conversation: only global instructions, selected memories, project sources, or retrieved past content may carry over.
- Use a temporary or private mode: the product may intentionally avoid history and memory.
OpenAI’s current Temporary Chat documentation illustrates why product settings matter: a temporary chat can be configured differently from a regular saved chat and does not create or update memories while temporary. Exact behavior varies by account, workspace, and product, so inspect the controls you actually have rather than assuming all chats behave alike.
Long-term memory is selective and fallible
Long-term memory normally does not copy all prior chats into every request. A product may extract facts, synthesize a profile, or search prior activity when it predicts that the information is useful.
That creates four predictable failure modes:
- Write failure: the detail was not stored.
- Selection failure: it was stored but not included for this response.
- Staleness: an old preference or fact remained after circumstances changed.
- Conflict: multiple memories or sources disagree.
OpenAI’s current Memory FAQ says its memory summary is a synthesis and may not display every influence; it also distinguishes saved memory from chat history. Google likewise documents that Gemini personalization based on past chats depends on account type, settings, and product availability.
This is why memory is appropriate for stable preferences and recurring facts, but a poor sole source for project-critical decisions.
Retrieval is not memory either
Retrieval gives the model access to an external source when needed. The source may be a file, database, search index, email store, or project workspace. Retrieval quality depends on more than whether the file exists:
- the current identity must have permission;
- the source must be indexed or available to a tool;
- the query must describe the needed information;
- ranking must surface the correct passage;
- the retrieved version must be current;
- the model must receive the passage and use it correctly.
When retrieval fails, users often say “the AI forgot,” but the repair may be an access rule, stale index, poor source structure, ambiguous naming, or missing citation—not a memory toggle.
For important work, ask the system to cite the file, record, timestamp, or conversation it used. A fluent answer without source evidence cannot distinguish recall from invention.
Durable state is the answer for ongoing work
Preferences belong in memory. Project facts belong in a maintained source of truth. Workflow progress belongs in structured state.
Durable state can include:
- task ID and current status;
- accepted requirements and decisions;
- artifact locations and versions;
- completed and pending steps;
- approvals and policy version;
- tool results and external side-effect IDs;
- unresolved questions and next action.
Long-running agent systems use checkpoints and handoff artifacts because conversation text alone is not a reliable operational record. If another person or agent cannot resume from the stored state without reconstructing the entire chat, the continuity design is incomplete.
A reproducible memory diagnostic
Do not test with a familiar personal fact that the model could guess. Use a unique, harmless token such as cedar-orbit-741.
Test 1: active-context retention
- In a new regular chat, say: “For this test, the project token is
cedar-orbit-741.” - Send several unrelated messages.
- Ask for the project token in the same chat.
If it fails, the issue is inside the active conversation: truncation, compaction, instructions, or model reliability.
Test 2: same-session reopening
- Close or navigate away from the chat.
- Reopen that exact conversation from history.
- Ask for the token.
If the visible history remains but recall fails, check whether the product summarizes older content or whether the token still appears in the messages supplied to the model.
Test 3: cross-chat memory
- Confirm that memory or personalization is enabled.
- In the original chat, explicitly ask the product to remember the token if it supports that instruction.
- Start a new regular chat and ask for it.
Failure here does not prove history was deleted. It shows that the memory write, selection, account eligibility, or product behavior did not carry the detail into the new chat.
Test 4: retrieval
- Put a different token in a named test document.
- Add or connect that document using the product’s documented method.
- Ask a question that clearly refers to the document.
- Require the answer to cite the source name.
If the citation is absent or wrong, inspect access, indexing status, query wording, duplicate files, and document version.
Test 5: privacy controls
Repeat the cross-chat test in temporary or unpersonalized mode. Then delete the test chat and memory using the documented controls and repeat it again. Confirm behavior rather than assuming deletion in one store removes copies from every store.
Map the symptom to the fix
| Symptom | Likely layer | Better fix |
|---|---|---|
| Early instructions disappear in a long chat | Context window or compaction | Shorten context, create a verified summary, split the task |
| Reopening the same chat loses detail | Session assembly | Inspect visible history, retention, and summarization behavior |
| New chat misses a preference | Saved memory or personalization | Enable and inspect memory; store stable instructions explicitly |
| Agent cannot find a known file | Retrieval | Check identity, index, query, version, and citation |
| Work resumes from the wrong step | Durable state | Store checkpoints and step status outside prose |
| System uses an outdated fact | Memory or stale source | Correct/delete the memory; version the authoritative source |
| Deleted detail still influences output | Multiple stores | Remove it from chat, memory, files, and connected sources as applicable |
Choose the right continuity pattern
Stable preferences
Use explicit instructions or a reviewable memory feature. Keep the list short and periodically inspect it.
A bounded project
Use a project or workspace that keeps instructions, files, and conversations together. Maintain a short decision log and source index rather than relying on raw chat history.
Repeated operational work
Use a task contract, structured inputs, versioned templates, and a deterministic system of record. See how to build AI agents for repeated work for the workflow design side.
Long-running or multi-step agents
Use durable state, checkpoints, idempotent tools, trace logs, and explicit handoff artifacts. The agent harness guide explains the runtime layer that keeps model work bounded and resumable.
Privacy is part of the architecture
Persistent memory reduces repetition by retaining or reusing information. That benefit creates obligations:
- know which sources can influence future responses;
- separate personal, project, and organizational data;
- use the least data needed for the task;
- review memory and connected-app permissions;
- understand retention, deletion, export, and workspace-admin controls;
- avoid storing secrets in prompts or free-form memory;
- use temporary or unpersonalized modes when continuity is undesirable.
Deletion can be multi-step. OpenAI’s current documentation notes that saved memories and chat history are separate, while Google explains that removing remembered connected-app information may require deleting relevant chats and disconnecting the source. Follow the provider’s current instructions for the account type you use.
The practical rule
Do not ask one feature called “memory” to solve every continuity problem.
- Use context for the current decision.
- Use history to resume a conversation.
- Use saved memory for a small set of stable preferences and facts.
- Use retrieval for authoritative sources.
- Use durable state for project progress, approvals, and recovery.
Once you identify which layer failed, “the AI forgot” becomes a testable engineering problem rather than a mysterious model personality.
https://floatboat.ai/blog/why-ai-forgets-between-sessions
