Writing
Memory Is Becoming a System Capability
A follow-up to the long-context argument. Storing, selecting and expiring facts is turning into a named part of the product.
Writing
A follow-up to the long-context argument. Storing, selecting and expiring facts is turning into a named part of the product.
Notes
In February 2024, I wrote that long context is not memory. A million-token context window can keep more information available during inference, but it does not decide what should survive after the session ends, what should be updated, or what should be retrieved next week.
Claude 4 makes that distinction more concrete.
Anthropic says Claude Opus 4 can create and maintain "memory files" when developers give it access to local files. The model can extract useful facts, save them, and read them later to maintain continuity across long-running work. In Anthropic's example, Opus 4 builds a navigation guide while playing Pokémon rather than relying on the active context window to preserve everything.
That is much closer to what I mean by memory.
The interesting part is that the memory does not live inside the model. It lives in a system around the model.
A context window is temporary working state.
If a project brief, conversation history and several code files fit inside the current prompt, the model can use them while generating the next response. A larger window gives the model a larger workspace.
Persistent memory has a different job.
It needs to select information worth keeping, store it somewhere durable, recover it later, and decide when an old fact should be replaced by a new one. In a production system it should probably track scope and provenance too: is this fact about the user, this project, this repository, or only this task?
None of that follows automatically from context length.
Claude 4 is interesting because the model can participate in these memory operations when it has filesystem access. It can decide that a fact is useful enough to record, update a file as work progresses, and consult that file later.
The filesystem becomes part of cognition.
Retrieval-augmented generation already gives models access to information outside the context window.
A document corpus can be indexed, searched and inserted into a prompt when relevant. Anthropic's Contextual Retrieval work is a good example: the system improves the way chunks are represented so the retriever has more information about where each chunk belongs.
That solves an access problem.
Memory has an additional write problem.
A normal RAG system assumes the knowledge base already exists. The model searches it. A memory system has to decide when new state should enter that knowledge base in the first place.
Suppose an agent discovers that a build fails because one asset still uses an old export preset. Retrieval can help find documentation about export presets. Memory starts when the agent records that this project has migrated to the new preset, links that fact to the relevant project, and uses it during later work.
The difference is subtle but important.
Retrieval asks, "What existing information should I read?"
Memory asks that question plus, "What have I learned that should still exist after this task?"
Letting the model write its own memory is powerful because it reduces the need for developers to predict every fact worth storing.
It is dangerous for exactly the same reason.
A model can misunderstand a situation and save the misunderstanding. It can preserve a temporary assumption as a permanent rule. It can fail to update an old fact after the project changes. Later sessions may retrieve that note and treat it as trusted history.
The error has now survived the context window.
This means persistent memory needs more engineering than a text file named memory.md.
I would want memory entries to have scope, timestamps and some record of where the information came from. Project memory should not silently become user memory. A tool result should not be treated the same as an explicit user preference. Some facts should expire. Others should require confirmation before being overwritten.
The model can help decide what to save, but the storage layer should make those decisions inspectable.
MemGPT proposed a useful version of this architecture in 2023. It treated the context window like limited physical memory and external storage like a slower memory tier, moving information between them as needed. Its experiments included multi-session conversations where persistent information could survive beyond one context window.
Claude 4 brings part of that idea into a mainstream agent workflow.
The active context can hold the immediate problem. Files can carry durable notes across longer work. Retrieval can bring relevant external knowledge back into the active window. Tools can inspect the real environment when stored memory is not enough.
These layers have different properties.
Context is fast but temporary.
Files or databases are persistent but need selection and retrieval.
External tools provide current state but can be slower or expensive.
A good agent should know which layer to use instead of trying to make the context window perform every job.
This is where memory becomes useful to me beyond chat history.
A Blender production agent does not need to remember every conversation we have ever had. It needs a small set of durable project facts: naming conventions, export targets, approved cameras, material rules, output paths, known exceptions and decisions that should survive between sessions.
A game-development agent may need repository conventions, localisation rules, build commands, platform constraints and known project-specific failures.
Those facts are more valuable when they are explicit state than when they are buried in a transcript.
I would separate at least three types of memory.
User memory contains durable preferences that apply across projects.
Project memory contains facts and decisions tied to one production environment.
Task state contains temporary progress for the job currently running.
Mixing these together creates context pollution at a larger timescale. A useful fact from one client project can become wrong in another. A temporary workaround can quietly turn into a permanent rule.
Memory architecture therefore needs boundaries, not just storage capacity.
Anthropic describes Claude Opus 4 as capable of sustained work on long-running agent tasks, including workflows lasting several hours and requiring many steps.
The longer a task runs, the less realistic it becomes to keep every observation, tool result and intermediate decision inside one growing conversation.
Something has to be compressed, discarded or moved outside the active context.
Once that happens, memory management becomes part of task execution.
An agent fixing a large codebase may need a progress file describing what it already tried. A research agent may need notes about rejected hypotheses. A production automation system may need checkpoints recording which assets were processed and which still need attention.
These are not conversational memories.
They are operational state.
That is why I think "memory" will become a broader systems concept than the feature most people currently associate with assistants remembering personal preferences.
I expect agent platforms to expose memory more explicitly over the next few years.
Not one opaque store that silently remembers everything, but several forms of persistent state with different scopes and policies.
The model may decide when something appears worth preserving. The runtime can decide where it is allowed to write. Retrieval can decide what should return to context. Deterministic checks can verify important facts against the current environment before the system acts on them.
For production systems, I think editable and inspectable memory will be more useful than invisible memory.
If an AI system remembers that my Blender project exports in centimeters, I want to know where that fact came from and change it when the pipeline changes. If an agent records that a bug has been fixed, the next session should still verify the repository rather than trusting the note.
Memory should reduce repeated work without turning yesterday's assumptions into today's ground truth.
Claude 4 is an interesting signal because it makes the architecture visible. Give the model a filesystem and it begins using that filesystem to extend continuity beyond its immediate context.
The context window is still the workspace.
Memory is becoming the system that decides what is worth bringing back to it.
More