Agent Amnesia and the Case of Henry Molaison
Coding agents reset every session, with zero memory of the last. Here's the structured-memory system that gives them continuity — and why the fix is harder than it looks.
Full article excerpt tap to expand
← Back to blog Agent Memory April 23, 2026 12 min read Agent Amnesia and the Case of Henry Molaison In 1953, Henry Molaison lost the ability to remember anything that happened to him — every conversation was his first. Your coding agent has the same condition: every new session, zero memory of the last. Here's the fix. The Problem Does working with coding agents ever feel like you're living through Groundhog Day? If you've worked with coding agents extensively, then you've probably noticed this pattern: at the start of each session, they act like you're meeting for the first time. Every session starts from scratch. The agent must be onboarded every time, and you're the one filling in the gaps. In this article, I'll demonstrate why memory is an essential component for overcoming this deficiency, and outline the mechanisms necessary to make memory function for agents. Brute Force Doesn't Scale Does this resonate? To be fair, you don't need to give your agents memory. You can brute force good outcomes. Retry loops, corrective prompts, task reframing, and ever-growing instruction files can get you there... eventually. But is that our aim? It's expensive, unreliable, and it introduces context rot. Context rot is what happens when a growing context window has diminishing influence on the model's output. Relevant signals remain present, just buried and unused. (Chroma Research) It's also simplistic if we use correctness as the single measure of success. Unnecessary turns cost time, money, and most importantly, patience that we should place a premium on. We shouldn't be aiming for eventual success. The target should be continuity and determinishtic1, repeatable outcomes at minimal cost. 1 LLMs are probabilistic by nature. Perfect determinism is not achievable. The best we can hope for are reasonable approximations. What Is Memory? If we want to fix the missing memory problem, then we need to understand what memory is and how it works. We all understand memory intuitively, but the mechanism is more complex than it seems. Let's break it down... Memory is the encoding, storage, and retrieval of information when needed. There are three main types: Short-term Memory This is sensory information that is maintained for about thirty seconds while the brain determines whether it's relevant enough to encode and store. I mention it here for completeness, but it won't come up again. It's not where agents struggle. Long-term Memory This is information that is encoded, stored and made retrievable over long periods of time. There are two subtypes that are important to distinguish: declarative (facts and events) and non-declarative (skills, habits, priming). Working Memory This one is very important, because it is the brain's workspace, and is what makes accomplishing tasks possible. It manipulates information and depends heavily on long-term memory. Without working memory, you can know things but you can't apply them. Disclaimer: The concepts presented here are watered down from cognitive neuroscience research. The brain is complex and there are many nuances and subtypes of memory. What is presented here is known to be true, and sufficient for the purpose of this article. A list of sources is included at the end for anyone who wants to dive deeper. The Tools of Working Memory So, working memory is what makes accomplishing tasks possible, and long-term declarative memories are essential to its function. But, that's not all. You also need control processes,…
This excerpt is published under fair use for community discussion. Read the full article at Jumbo.