Context Window vs Memory

Simple Definition

A context window is the information an AI model can consider during one task or conversation, it disappears once that session ends. Memory is information the system deliberately stores and can retrieve again in a future, separate session. They solve different problems, and a large context window does not give a model memory on its own.

Why the Distinction Gets Confused

Modern context windows have grown large enough, some now reaching a million tokens, that it’s tempting to assume a model “remembers” everything you’ve discussed. It doesn’t, not automatically. Once a session ends, whatever was in that context window is gone unless something explicitly saved it somewhere persistent. A million-token context window is a bigger short-term workspace, not a long-term memory.

The Practical Difference

  • Context window: temporary, scoped to the current session, disappears when the session ends, no deliberate storage step required
  • Memory: persistent, deliberately saved, retrievable in future sessions, requires an explicit storage and retrieval mechanism

How Systems Bridge the Gap

Tools that appear to “remember” across sessions are usually doing one of a few things: saving specific facts to a persistent store and retrieving them into a future context window, using RAG to pull relevant saved information into context on demand, or relying on portable context files that get explicitly loaded each session, like a project instruction file. None of these are the context window itself doing the remembering, they’re separate systems feeding information back into it.

Example

A user has a long conversation with an AI assistant about their project, then closes the app and returns the next day. If the assistant has no memory system, it starts fresh, none of yesterday’s context window carries over. If it has a memory system, specific facts from that conversation were saved separately and get reloaded into today’s new context window, the model isn’t recalling the old session directly, it’s being handed a summary of it.

  • Context Window, the temporary working space during a session
  • Agent Memory, the persistent storage this term contrasts with
  • Portable Context, files explicitly loaded to bridge sessions
  • RAG, a common technique for retrieving saved information into context

Continue learning

Explore related guides, tools, workflows, and prompts that help you go deeper into this topic.

See AI terms in action

Browse practical AI workflows that use the concepts in this glossary.

Last updated: