Dreaming
by Anthropic · Technique · Text & code
A background process that reviews an agent's past sessions and corrects or updates its saved memories after the work is done.
Latest · Nov 12Dreaming is the process of correcting and updating an agent's saved memories, which grow outdated or wrong as work advances.
Evidence
- Nov 12Anthropic's article on agent memory frames dreaming as consolidation outside the session, by analogy to hippocampal replay during sleep.ReportedAnthropicvia
Rafael Quintanilha - Nov 12The article says dreaming can promote notes up the memory hierarchy, but injected notes cost tokens and a wrong note can spread across many sessions.ReportedAnthropicvia
Rafael Quintanilha - Nov 12Trade-off the article describes: writing notes during a task distracts the agent, while background dreaming leaves results unavailable immediately. Dreaming also costs compute.ReportedAnthropicvia
Rafael Quintanilha - Nov 12The method needs only session transcripts, so it works with other harnesses such as Codex, OpenCode and Pi, not just Claude Code.Hands-on test
Rafael Quintanilha - Nov 12Advice: before dreaming, sanitize exported transcripts by dropping verbose tool logs and removing secrets such as API keys.Hands-on test
Rafael Quintanilha
Alternatives
More Dreaming