Agent memory: from context window to lasting memory

The context window is the agent\u2019s working memory: it takes everything in — and is wiped when the session ends. "Context rot" research showed this memory starts failing long before the window fills. Real agent memory is therefore built outside the window, in three layers: short-term memory for the session, cross-session memories on disk (Markdown files, vector databases), and organizational knowledge living in RAG.
The winning 2026 pattern is simpler than what frameworks sell: files. Claude Code and its family keep Markdown files as memory — human-readable, human-editable, zero new infrastructure. For structured data a vector database sits beside it: the agent reviews before it acts. The real gain of memory is not token savings — it is quality: an agent that knows your team\u2019s language, yesterday\u2019s mistakes and the delivery format you like covers half the distance without asking.
And that is exactly where the main risk lives: stale memory is worse than forgetting. An outdated file sends the agent confidently toward a wrong answer. The maintenance rule: memories need expiry dates and rewriting by newer evidence — the periodic review the human mind performs too. Teams treating this seriously today will, next year, work with agents that genuinely "know them".