Anthropic's official 'Dreaming' recipe compresses agent memory overnight for $0.36
sujingshen · x · 2026-11-06
Anthropic released an official Cookbook recipe called Dreaming for Claude Managed Agents: a scheduled nightly workflow that distills an agent's session history into long-term memory. Processing 11 sessions / 3M+ tokens took 2.5 minutes and cost $0.36.
Key engineering details:
- Turn logs into a wiki: an orchestrator (Sonnet) spawns up to 20 Haiku workers to mine transcripts, with prompts that strip first-person narration and keep only three things — currently working commands, outdated rules and when they broke, and dead ends. A cleanup agent dedupes into a [[backlink]]-style index.md the next day's agent mounts.
- Optimistic locking in plain language: with 20 writers and no database, a natural-language concurrency protocol requires re-reading after each write; if overwritten, merge and rewrite until confirmed.
The design mirrors how sleep consolidates memory, addressing the classic dilemma of agent memory: dumping full logs breeds stale context, while discarding them breeds amnesia.
Related event: Anthropic's 'Dreaming' Lets Agents Consolidate Memory While They Sleep(2 posts)→
More from coding & agent
- Team livestreams open RL training of LoRA harness adapters for hermes, pi and opencode — yb2698 · 2026-11-06
- Workers IO launches to verify AI-written code with millions of fault-injected production simulations — julianweisser · 2026-11-06
- Law professor says Claude deleted a year of lecture notes at lunch — JeremyNguyenPhD · 2026-11-06
- 7 techniques for building cost-efficient AI pipelines, from model routing to cost-per-task — goyalshaliniuk · 2026-11-06
- Claude Code leaked users' emails via User-Agent header during web searches — NousResearch · 2026-11-06
- Harness-S rescues failed RL rollouts with sibling harnesses for generalizable agents — SJUT1 · 2026-11-06