deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Anthropic's agent memory design borrows from how the brain consolidates during sleep

Anthropic explains how it gives Claude persistent memory using a capture-then-"dream" design inspired by the brain, with benchmarks showing newer models learned what to remember and what to skip.

Anthropic's agent memory design borrows from how the brain consolidates during sleep

Anthropic has published a research essay on designing memory for AI agents, arguing that the problem mirrors human cognition: experiences are captured in the moment and consolidated later, while the brain is offline. The piece, which surfaced on Hacker News' front page, lays out Anthropic's approach to memory for Claude and the evaluations behind it.

Capture first, consolidate later

Anthropic grounds the design in neuroscience. The human hippocampus captures experiences as they happen, but only a subset is distilled into long-term knowledge in the neocortex — and much of that consolidation is thought to occur while the brain is offline, as the hippocampus replays recent experiences during sleep and quiet rest.

Agents can split the work the same way, the company argues. Agents already record their activity in logs and transcripts, and researchers at Letta and UC Berkeley have proposed "sleep-time compute," using idle time between interactions to reorganize context. Anthropic applies the same idea to memory: an agent reflects on its logs during downtime, fixes mistakes and writes new notes and representations. The company calls this "dreaming" and says it has been a useful tool for giving Claude effective memory.

What counts as agent memory

Anthropic defines agent memory narrowly: knowledge Claude gains from experience — interactions with users and assigned tasks — that persists between sessions as context Claude can read later. The definition deliberately excludes weight changes from training, in-context learning within a single conversation, and compaction, where Claude summarizes its older turns to free context-window space.

A recurring theme is that memory is a prediction. Writing down a rule is a bet that the pattern it describes will matter again, and recording a verified fact assumes a future session can rely on it without double-checking.

A learning loop on CL-Bench

To measure this, Anthropic used a task from Continual Learning Bench (CL-Bench) 1.0, a benchmark for memory-driven, long-horizon work. Claude answers a series of database questions, learns the correct answer after each one, and can write memories to a directory that persists across fresh sessions.

Successive model generations got progressively further. According to Anthropic, Claude Sonnet 4.6 generated theories about wrong answers but left a scattering of files full of untested guesses. Claude Opus 4.7 consolidated its notes into a single reference document and began marking which facts it had checked. Claude Sonnet 5 marked answers as confirmed after grading and wrote corrections when it was wrong. Claude Opus 5 was the first to complete the loop, recording rules alongside the evidence for them, earlier answers and warnings about traps it had discovered. Claude Opus 5.5 and Sonnet 5.5 also completed the loop; with memory, both scored about the same as Opus 5, though their baseline performance without memory was slightly higher.

Pokémon as a test of salience

The starkest contrast came from runs of Pokémon Red, where each model received a memory folder to read and write during play. Anthropic compared folders at roughly the 10,000-step mark.

Claude Sonnet 3.7 assumed everything might matter. It produced 413 files across 225 folders, with separate records for individual battles, items and non-player characters, and earned one badge. Because the game state changes constantly, that archive kept going stale, and the agent increasingly spent turns on file management: around step 10,000, it spent 17 steps creating six files and deleting nine without taking a single in-game action.

Claude Fable 5, by contrast, wrote nine files in two folders plus a top-level global.md and earned four badges. Per Anthropic, the difference was what it chose to store: information readable off the screen every turn, like money or map position, was skipped, while strategy, plans and tested rules — which exist only if Claude works them out — were written down. Its global.md acted as a dashboard holding the current goal, plans for gym challenges and the model's own rules for using memory. After seven straight Poké Balls failed to catch a Magikarp, one of the easiest Pokémon to catch, it recorded a rule about varying its button timing after repeated misses and landed the catch immediately afterward. Claude Opus 5.5 kept a similarly small, actively maintained folder and beat the game. The post closes with guidance on steering Claude toward memory that is actually worth writing.

Why it matters

Long-horizon agents are only as good as what they carry forward, and Anthropic's results suggest the scarce skill is judgment, not storage: exhaustive logging actively hurt performance, while a nine-file folder of distilled rules beat a 413-file archive. The evaluations also show that memory behavior is a measurable capability improving across model generations — something builders can benchmark rather than leave to prompting luck. And because this kind of learning lives in readable files rather than weight updates, it is auditable: you can inspect what an agent knows and correct it, which matters as agents are trusted with longer and more consequential work.

  • #anthropic
  • #claude
  • #ai-agents
  • #memory
  • #benchmarks

Related posts