Ology

Memory Is a Context-Management Problem

AI agent memory and context management: architectures, retrieval, context windows, personalization, evaluation, implementation trade-offs, reliability, privacy, and open questions.

5 sessions · 16 readings · 610 views

Curated by Clara Whitfield

The Context Is the Agentsession 1What Deserves to Survive?session 2Retrieval Is a Decision, Not a Lookupsession 3Long-Horizon Work Needs an External Statesession 4Can Memory Be Trusted?session 5

Opening

AI agents are becoming less like chat interfaces and more like persistent workers. They browse, call tools, modify files, query databases, and continue tasks across multiple sessions. That shift makes memory unavoidable: an agent that cannot preserve the right constraints, discoveries, and decisions is not merely forgetful—it is unreliable.

Recent systems have moved beyond the simple “store a summary in a vector database” pattern. Anthropic describes compaction, structured note-taking, just-in-time retrieval, and sub-agent architectures as different ways to manage a finite attention budget. OpenAI’s newer systems treat memory synthesis, tool history, filesystem state, institutional knowledge, and runtime inspection as distinct layers. Letta pushes the stronger claim that memory is not a detachable feature at all, but a responsibility of the agent harness.

The central difficulty is that remembering more is not necessarily better. Irrelevant history can degrade performance; summaries can erase details that later become important; persistent memories can become stale, contradictory, or poisoned; and personalization raises difficult questions about ownership, privacy, and correction. The system must decide not only what to store, but what to expose, when to update it, and how to know whether it helped.

This seminar follows memory from context design to long-term operation: what counts as memory, how memories are formed and revised, how agents navigate large stores and tool histories, how long-running systems preserve state, and how we evaluate whether continuity improves rather than quietly damages behavior.

Five questions worth arguing about

  1. 1The Context Is the Agent
  2. 2What Deserves to Survive?
  3. 3Retrieval Is a Decision, Not a Lookup
  4. 4Long-Horizon Work Needs an External State
  5. 5Can Memory Be Trusted?

The Sessions

1Session 1start here

The Context Is the Agent

The problem

The first question is conceptual: is agent memory a database feature, or is it the architecture that determines what the model can see and change? The answer matters because retrieval is only one operation. A memory system also decides how prompts are rewritten, which tools and files are visible, what survives compaction, how interaction history is represented, and whether the agent can modify its own persistent state.

Anthropic’s account starts from a finite “attention budget.” Its distinction between prompt engineering and context engineering reframes the task as continuous selection among system instructions, tool schemas, retrieved information, message history, and external artifacts. Letta approaches the same problem through an “LLM operating system” metaphor, separating kernel-managed context, user messages, memory blocks, files, and tools. Its more provocative argument is that memory cannot be bolted onto an otherwise stateless harness.

These readings belong together because they challenge the usual short- versus long-term-memory taxonomy. The important unit is not simply where information is stored, but how the harness turns external state into usable working context. That sets up the next question: once memory is treated as an active system, how should it write and revise itself?

2Session 2

What Deserves to Survive?

The problem

A memory system must make irreversible or semi-irreversible decisions. It cannot preserve every message, tool result, and intermediate thought indefinitely in the active context, but it also cannot know with certainty which details will matter later. Memory formation is therefore a problem of compression, salience, and revision—not just storage.

Anthropic’s structured-note approach gives the agent an explicit external workspace: a to-do list, notes file, or project state that can be read after a context reset. OpenAI’s compaction mechanism instead produces a compact representation of prior state and retains selected high-value material. These are not equivalent strategies. Note-taking gives the agent a writable, inspectable artifact; compaction offers a more automated continuity mechanism but makes the quality of the summary crucial.

OpenAI’s “dreaming” system adds a third model: background processes synthesize memories from many conversations, rather than relying only on explicit “remember this” commands. That improves personalization but introduces new failure modes—staleness, incorrect generalization, unwanted inferences, and questions about how users inspect or correct what has been learned. The next session asks how these memories are actually found and used.

3Session 3

Retrieval Is a Decision, Not a Lookup

The problem

A memory that is never retrieved is inert; a memory retrieved at the wrong time is harmful. Agent memory therefore depends on retrieval policy: semantic similarity, recency, metadata, explicit search, tool-mediated exploration, permissions, and the model’s own judgment about whether it needs more context.

Anthropic argues for “just-in-time” context: keep lightweight references and let the agent navigate files, databases, and tools as needed, rather than preloading everything. This can preserve focus and support progressive disclosure, but it trades lower initial context for more runtime decisions, latency, and opportunities for the agent to search badly. OpenAI’s internal data agent illustrates a more layered alternative, combining usage metadata, human annotations, code-derived semantics, institutional documents, memory, and live warehouse inspection.

The contrast is instructive. One system emphasizes autonomous exploration over a structured environment; the other combines precomputed retrieval with runtime validation and permissions. Both reject the idea that embeddings alone constitute understanding. Retrieval must be connected to provenance, freshness, access control, and domain-specific meaning. Once tool calls and interaction history become part of memory, the architecture also becomes a security boundary.

4Session 4

Long-Horizon Work Needs an External State

The problem

A long-running agent cannot simply “keep the whole conversation.” Tasks that last hours or days cross multiple context windows, tool environments, and sometimes model instances. The engineering problem becomes one of continuity: what durable artifacts let a fresh session understand what happened, what remains unfinished, and which decisions are authoritative?

Anthropic’s long-running-agent harness separates initialization from incremental work. Rather than asking every new session to rediscover the project, the initializer creates a feature list, environment structure, and explicit progress state. This is a practical response to premature completion and session boundaries. OpenAI’s computer environment makes a related move by treating files, databases, skills, and execution state as the agent’s working context rather than forcing all information into prompt text.

Letta makes the architectural implication explicit: the harness, not merely the model, owns the relationship between state and context. The readings disagree less about the need for external state than about how much control should belong to the model, the harness, or background memory processes. That disagreement leads directly to implementation trade-offs involving latency, cost, inspectability, model portability, and recoverability.

5Session 5finish here

Can Memory Be Trusted?

The problem

Memory changes the reliability profile of an agent. A failure in a single response may disappear when the conversation ends; a failure written into persistent state can recur across every future interaction. Evaluation must therefore test not only whether an agent completes a task, but whether it preserves constraints, retrieves the right information, updates memory correctly, avoids memory rot, and remains safe when context is adversarial.

Anthropic’s evaluation framework emphasizes multi-turn, state-changing workflows in which errors compound and static answer benchmarks are insufficient. Hamel Husain and Shreya Shankar recommend starting with end-to-end success, then tracing step-level failures such as tool choice, context retention, error recovery, and transition hotspots. Letta’s memory benchmark goes further by separating memory usage from memory generation and by testing agents with messy, realistic accumulated state rather than clean toy profiles.

Security complicates the picture. Anthropic identifies persistent memory poisoning as a form of post-exploitation: malicious instructions can survive the original interaction and be reloaded later through product memory, files, workspaces, or scheduled-agent state. The seminar therefore ends with an unresolved standard: should memory be judged by recall, usefulness, and personalization—or by whether the agent can explain, correct, expire, and defend the state it carries forward?

Interested in joining a reading club with top AI experts?

Small groups, great readings, real conversations. Learn faster and grow your network.

A friend that hands you reading lists, not search results.

© Ology 2026