Agent Memory
Agent memory is what an AI agent retains across sessions, unlike context, which is loaded fresh into each request. Memory persists; context is per-run.
Updated
Agent memory is what an AI agent retains beyond a single run. It comes in layers, and the layers get confused constantly:
- Session memory is what the agent holds during one run: the conversation so far, files it read, notes it wrote itself. It lives in the context window and vanishes when the session ends.
- Persistent memory is what survives across sessions: memory files, learned preferences, a store the agent writes to and reads back later. Your agent remembers your codebase quirks tomorrow.
- Shared team memory is what every agent on the team can read: the decisions, constraints, and conventions the team holds, not one user.
Memory vs context
The line people miss: memory is a place information lives; context is what actually reaches the model on a given request. An agent with perfect persistent memory still fails if the right memories aren't assembled into context for the task at hand. That assembly is context engineering.
The gap: per-user memory doesn't coordinate a team
Almost all agent memory today is scoped to one user. That's fine for preferences. It's useless for coordination: your agent learning "the events table is append-only" does nothing for the five other agents on your team. Each memory is a silo, so the team's decisions fragment across them, a direct route to decision drift.
This isn't a niche complaint. An engineering manager running two teams (fourteen engineers) filed it against Claude Code (issue #38536), calling individual-only memory "the single biggest efficiency bottleneck for teams adopting Claude Code seriously."
Lockstep sits in that third layer: a shared, human-approved memory of the team's decisions, served to any MCP-speaking agent, so every session starts knowing what the team decided rather than only what one user's agent happened to learn.
- What's the difference between agent memory and context?
- Memory persists across sessions; context is what gets loaded into a single request. A brand-new session has no memory, but it still gets context: the prompt, files, and tool results assembled for that run. Memory is one source that context can be built from.
- Do AI coding agents have persistent memory?
- Increasingly, yes, but per user. Claude Code keeps memory files, and other agents have similar mechanisms. What they retain is scoped to one person's sessions; it doesn't transfer to a teammate's agent.
- Why doesn't per-user agent memory work for teams?
- Because each engineer's agent accumulates its own private memory, and none of it transfers. Your agent can learn a constraint on Monday and your teammate's agent can violate it on Tuesday. Coordination needs a shared record both agents read.
Related