Zenaique

How does the ChatGPT style cross-session memory differ from within session rolling summary?

Flashcard·Medium·4.0 · 0·~30s·Asked atGleanLepton AiUnity
Attempt it
TL;DR

Rolling summary is intra-session compression that dies with the chat; persistent memory is a cross-session user-fact store that boots every new chat with relevant context.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine a long phone call with a friend versus a friendship across many phone calls. During one call you sometimes recap what you were just talking about so the call stays coherent. That recap dies when you hang up. Across many calls, your friend remembers things about you: where you live, what you do, what coffee you drink. They bring that up in future calls. Those are two completely different kinds of memory. One is about not losing track inside a single conversation. The other is about being a continuing relationship. A chat product needs both, and they live in different places.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

"Memory" is one of those words that bundles several distinct primitives in a way that causes design problems. A real chat product has at least two of them, with different scopes, lifecycles, storage, and retrieval logic. The most common architectural mistake in 2026 agent products is treating them as one thing and stuffing them into the same slot.

This card walks through what each one actually is, why the frameworks of 2026 treat them as separate primitives, and what goes wrong when they get conflated.

Rolling summary: intra-session compression

Rolling summary exists to solve a specific problem: a conversation grows past the verbatim turn budget and you need to keep it coherent.

The pattern is straightforward. The most recent N turns stay verbatim (preserving pronouns, exact strings, current intent). Older turns get compressed into a running summary paragraph that occupies a fixed slot in the context. Periodically the summary is refreshed, usually every K turns, or whenever the verbatim slot would overflow.

Lifecycle. Born with the conversation. Refreshed during the conversation. Dies when the conversation ends. The summary state is part of the conversation state, not a global store.

Failure modes. Summary drift compounds when each refresh takes the previous summary as input instead of the original transcript. Periodic re-summarization from the raw transcript (or a windowed prefix of it) mitigates this. Summary noise is another failure: a too-aggressive compression loses pronoun referents or exact entity names that the model later needs.

Where it lives in the budget. A modest slot. For a 16k window, typically 800-1500 tokens. Its job is connective tissue, not main signal.

Persistent memory: cross-session continuity
Why the frameworks separate them
Failure modes from conflation
The 2026 production shape
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • ChatGPT's persistent memory feature shows users an editable list of facts the system has decided to remember across sessions; this is the canonical cross-session primitive.
  • LangChain's ConversationSummaryBufferMemory implements rolling summary as a within-session primitive; LangChain's separate store integrations handle persistent memory.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow do you decide what gets written to persistent memory versus discarded?
A

Two policies: explicit ('the user said remember X') and extraction-based (a background LLM pipeline pulls candidate facts from past conversations and scores them for durability). Filter on relevance, recency, and user-confirmation signal.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Conflating the two as 'memory' and putting them in the same slot. They solve different problems, have different lifecycles, and need different storage and retrieval logic.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Define rolling summary in one sentence

  • Define persistent memory in one sentence

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Pick the most effective intervention when an agent's context grows by 8KB every iteration
MCQ·Medium