AI Agents

Why AI Forgets Between Sessions—and How to Fix It

Diagnose why an AI loses context between chats by separating context windows, session history, long-term memory, retrieval, and privacy controls, then choose a reproducible fix.

Nova9 min read
Why AI Forgets Between Sessions—and How to Fix It

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”

LayerWhat it doesTypical lifetimeCommon failure
Context windowHolds the tokens available to the current model callOne request or active conversation assembled by the appOlder material is omitted or compressed
Session historyStores messages so an application can reopen or resend themUntil deletion or retention policyNew chat starts without that history
Saved memoryStores selected preferences or facts for reuseAcross chats until changed or deletedDetail was never saved, is stale, or is not selected
RetrievalFinds relevant files, messages, or records at runtimePer queryWrong query, permissions, indexing, ranking, or version
Durable project stateRecords decisions, artifacts, progress, approvals, and external IDsAcross sessions and workersState 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:

  1. Write failure: the detail was not stored.
  2. Selection failure: it was stored but not included for this response.
  3. Staleness: an old preference or fact remained after circumstances changed.
  4. 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

  1. In a new regular chat, say: “For this test, the project token is cedar-orbit-741.”
  2. Send several unrelated messages.
  3. 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

  1. Close or navigate away from the chat.
  2. Reopen that exact conversation from history.
  3. 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

  1. Confirm that memory or personalization is enabled.
  2. In the original chat, explicitly ask the product to remember the token if it supports that instruction.
  3. 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

  1. Put a different token in a named test document.
  2. Add or connect that document using the product’s documented method.
  3. Ask a question that clearly refers to the document.
  4. 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

SymptomLikely layerBetter fix
Early instructions disappear in a long chatContext window or compactionShorten context, create a verified summary, split the task
Reopening the same chat loses detailSession assemblyInspect visible history, retention, and summarization behavior
New chat misses a preferenceSaved memory or personalizationEnable and inspect memory; store stable instructions explicitly
Agent cannot find a known fileRetrievalCheck identity, index, query, version, and citation
Work resumes from the wrong stepDurable stateStore checkpoints and step status outside prose
System uses an outdated factMemory or stale sourceCorrect/delete the memory; version the authoritative source
Deleted detail still influences outputMultiple storesRemove 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

Frequently Asked Questions

Why does my AI forget everything when I close the tab or start a new session?
A new model call only knows the information the application supplies. A new chat may omit prior messages, memory may be disabled or selective, retrieval may miss a source, or privacy settings may prevent reuse. First identify whether the missing information belongs to context, history, memory, retrieval, or durable state.
Is a context window the same as long-term memory?
No. The context window is the capacity for input and output available to a current model invocation. Long-term memory is an application feature that stores or synthesizes selected information for future chats. A larger window can reduce truncation inside a task but does not decide what persists after the session.
If my chat history is saved, why does a new chat not know it?
Storage and use are different. History allows an application to reopen a conversation, but supplying every old message to every new chat would add noise, cost, and privacy risk. A new chat normally receives only the sources selected by the product, such as global instructions, saved memory, project files, or retrieved history.
How can I test whether cross-chat memory works?
Use a unique harmless token. Ask the product to remember it in a regular chat, then start a new chat and request it. Repeat with memory on and off and in temporary mode. This isolates cross-chat behavior without relying on a common fact the model might guess.
Why can an AI fail to find a file that I connected?
The current identity may lack permission, indexing may be incomplete, the query may be ambiguous, ranking may select the wrong passage, or the indexed copy may be stale. Require a citation to the source name and version, then inspect access, indexing, duplicates, and query wording.
What should go in saved memory versus project state?
Put a small set of stable preferences and recurring facts in reviewable memory. Put requirements, decisions, artifact versions, progress, approvals, and external IDs in a maintained project source or structured state. Project-critical truth should not depend on a selectively generated memory profile.
Can deleting a chat leave a saved memory behind?
Depending on the product, yes. Chat history, saved memory, files, connected apps, and safety retention can be separate stores. Review the provider's current deletion instructions and remove the information from every applicable source rather than assuming one delete action covers all layers.
What is the safest way to preserve continuity for long-running work?
Use a maintained source of truth plus structured durable state: decisions, versions, completed steps, approvals, checkpoints, and side-effect IDs. Let the model retrieve only the context needed for the next decision, and use temporary or unpersonalized modes when continuity is not desired.