Anant Jain

Let Your AI Sleep

Tech

Your brain spends a third of its life in sleep mode, actively cleaning itself. It prunes memories, consolidates learning, and clears noise. More importantly, it decides what to keep and what to discard. Sleep doesn't preserve everything; it curates.

Most AI systems don't get that luxury.

We keep adding context to their external memory—Claude.md, cursor-rules, prompts.json—without giving the system a way to decide what still matters. Over time, these memory files drift, contradict, and decay. The system remembers everything and nothing at once. As context windows grow and memory files accumulate, we're building systems that hoard rather than curate.

Recent AI research has begun exploring a version of this problem. "Sleep-time compute" approaches let LLMs process context during idle periods, before user queries arrive.1 The broader design idea is compelling: forgetting can be a feature rather than a failure when the system preserves what remains useful and prunes what no longer does.

It's time we gave our AIs a nightly cleanup cycle. Imagine Claude Code running an end-of-day pass in CI to propose a refresh to its Claude.md based on the day's commits to main:

  • Identifying contradictions between old instructions and new patterns
  • Merging redundant directives
  • Pruning one-off instructions that no longer apply
  • Strengthening patterns that keep recurring

The output should be a reviewable diff, not an automatic rewrite. Consolidation is useful only if the system can show what it wants to remember, forget, or change.

Right now we're building AI systems with ever-growing memory but no equivalent mechanism for wisdom. Sleep teaches us what matters.

Footnotes

  1. Lin, K., et al. "Sleep-time Compute: Beyond Inference Scaling at Test-time." Letta/UC Berkeley, 2025. https://arxiv.org/abs/2504.13171.