AI, why does it also need to sleep?

Source: Geek Park

Written by: Tang Yitao

On March 31, 2026, Anthropic, due to a packaging mistake, leaked 510k lines of source code for Claude Code into a public npm repository. Within hours, the code was mirrored to GitHub, and it could never be taken back.

There was a lot of leaked content; security researchers and competitors took what they needed. But among all the unreleased features, one name drew widespread discussion—autoDream, automatically having dreams.

autoDream is part of a background resident system called KAIROS (Ancient Greek, meaning “the right moment”).

KAIROS continuously observes and records while users are working, maintaining each day’s log (kind of like a lobster thing). autoDream only starts after the user shuts down their computer: it organizes the memories accumulated during the day, clears contradictions, and turns vague observations into definite facts.

Together, the two form a complete cycle: KAIROS is awake, autoDream is asleep—Anthropic’s engineers built an AI schedule.

Over the past two years, the hottest narrative in the AI industry has been Agents: autonomous operation, never stopping—this has been treated as AI’s core advantage over humans.

But the company that pushed Agent capabilities the furthest is precisely one that sets a rest time for AI within its own code.

Why?

01 The cost of never stopping

An AI that never stops will run into a wall.

Every large language model has a “context window,” with a physical limit on how much information it can process at once. When an Agent runs continuously, the project history, user preferences, and conversation logs keep piling up; after passing a critical point, the model starts forgetting early instructions, contradicting itself, and fabricating facts.

The technical community calls this “context corruption.”

Many Agent solutions are pretty blunt: shove all history into the context window and expect the model to sort out what matters on its own. The result is that the more information there is, the worse it performs.

The same wall is what the human brain hits too.

Everything experienced during the day is quickly written into the “hippocampus.” This is a temporary storage area with limited capacity—more like a whiteboard. Real long-term memory is stored in the “neocortex,” which has a large capacity but writes slowly.

The core job of human sleep is to wipe the loaded whiteboard clean and move useful information into the hard drive.

A lab at the Neuroscience Center of the University of Zurich in Switzerland—headed by Björn Rasch—named this process “active systems consolidation.”

Continuous sleep deprivation experiments repeatedly prove that a non-stop brain does not become more efficient: memory first goes wrong, then attention, and finally even basic judgment collapses.

Natural selection is extremely harsh toward inefficient behavior, but sleep has not been eliminated. From fruit flies to whales, nearly all animals with nervous systems sleep. Dolphins evolved “half-brain sleep,” where the left and right brains rest in turns—preferring to invent a brand-new sleep method rather than give up sleep itself.

Orcas, beluga whales, and bottlenose dolphins resting at the bottom of a pool | Image source: National Library of Medicine (United States)

The two systems face the same set of constraints: limited real-time processing capability, but infinite expansion of historical experience.

02 Two answer sheets

In biology, there’s a concept called convergent evolution: species that are distantly related, but because they face similar environmental pressures, independently evolve similar solutions. The most classic example is the eye.

Octopuses and humans both have camera-like eyes: a focusing lens that concentrates light onto the retina, a ring-shaped iris that controls the amount of incoming light, and an overall structure that’s almost identical.

Comparison of octopus and human eyeball structure | Image source: OctoNation

But octopuses are mollusks and humans are vertebrates. Their common ancestor lived more than 510k years ago, when Earth had no complex visual organs. Two completely independent evolutionary paths reached almost the same endpoint. Because the paths allowed by physical laws for efficiently converting light into a clear image are almost only the camera-like route—focusing lenses, photosensitive surfaces that can carry the image, and an aperture that can adjust incoming light—none of which can be missing.

The relationship between autoDream and human sleep may be of this kind: under similar constraints, the two types of systems might converge on similar structures.

Being forced to go offline is the most similar shared point between the two.

autoDream can’t run while the user is working. It launches independently as a forked subprocess, fully isolated from the main thread, with strictly limited tool permissions.

The human brain faces the same problem, but the solution is even more thorough: memory is transferred from the hippocampus (temporary storage) to the neocortex (long-term storage), requiring a set of brain rhythms that appear only during sleep.

Among these, the most critical is the hippocampal sharp-wave ripple, which is responsible for packing the memory fragments encoded that day and sending them one by one to the cerebral cortex. Slow oscillations in the cerebral cortex and thalamic spindles provide precise temporal coordination for the entire process.

These rhythms can’t form while awake; external stimuli disrupt them. So you don’t sleep because you feel sleepy—the brain has to close the front door before it can open the back door.

Or, put another way: within the same time window, information intake and structure organization compete for resources, rather than complement each other.

Active systems consolidation model during sleep. A (data migration): During deep sleep (slow-wave sleep), memories newly written into the “hippocampus” (temporary storage) are replayed repeatedly, so they are gradually transferred and consolidated into the “neocortex” long-term storage. B (transmission protocol): This data transfer process depends on highly synchronized “dialog” between the two regions. The cerebral cortex emits slow brainwaves (red line) as the master clock beat. Driven by the peaks, the hippocampus packs memory fragments into high-frequency signals (the sharp-wave ripples at the green line), and perfectly coordinates with the carrier waves emitted by the thalamus (thalamic spindles at the blue line). It’s like precisely embedding high-frequency memory data into the gaps of the transmission channel, ensuring the information is synchronized and uploaded to the cerebral cortex. | Image source: National Library of Medicine (United States)

The other approach is not full-memory storage, but editing.

After autoDream starts, it doesn’t retain all logs. It first reads existing memory to confirm known information, then scans KAIROS’s daily logs, focusing on parts that deviate from prior cognition: those that are different from what it said yesterday, and those that are more complex than previously thought, get prioritized for recording.

After organization, the memories are stored in a three-layer index set: a lightweight pointer layer is always loaded; topic files are loaded on demand; and the complete history is never loaded directly. Facts that can be directly found from the project code (for example, which file defines a certain function) are not written into memory at all.

What the human brain does during sleep is almost the same thing.

A study by Erin J Wamsley, a lecturer at Harvard Medical School, shows that sleep prioritizes consolidating unusual information—such as information that surprises you, stirs your emotions, or is related to problems you haven’t solved yet. A large amount of repeated, featureless everyday details is discarded, leaving only abstract rules—you might not remember exactly what you saw on your way to work yesterday, but you do remember the route and how to get there.

Interestingly, in one place the two systems make different choices. The memories produced by autoDream are explicitly labeled in the code as “hint” rather than “truth.” Before each time the agent uses them, it must re-verify whether they still hold, because it knows that the things it organized may be inaccurate.

The human brain doesn’t have this mechanism. That’s why eyewitnesses in court often give incorrect testimony. They aren’t lying on purpose; it’s because memory is temporarily assembled from scattered fragments in the brain, and errors are the norm.

Evolution probably doesn’t need to put an “uncertainty” tag on the human brain. In a primitive environment where the body must respond quickly, believing memory lets you act immediately, doubting memory makes you hesitate—and hesitation means defeat.

But for an AI that repeatedly makes knowledge-based decisions, the cost of verification is low, and blind confidence is actually dangerous.

Two scenarios, two different sets of answers.

03 Smarter laziness

In evolutionary biology, convergent evolution means two independent routes that—without directly exchanging information—head to the same destination. There’s no plagiarism in nature, but engineers can read papers.

When Anthropic designed this sleep mechanism, was it because they hit a physical wall that’s the same as the human brain, or did they reference neuroscience from the beginning?

There are no neuroscience papers cited in the leaked code, and the name autoDream is also closer to a programmer’s joke. A stronger driver should still be the engineering constraints themselves: context has a hard upper limit, long-running leads to noise accumulation, and online organization pollutes the main thread’s reasoning. They’re solving an engineering problem, and biomimicry was never the goal.

What truly determines the shape of the answer is still the compressive force of the constraints themselves.

Over the past two years, the AI industry’s definition of “stronger intelligence” has almost always pointed in the same direction—bigger models, longer context, faster reasoning, and 7×24 nonstop operation. The direction is always “more.”

The existence of autoDream suggests a different proposition: clever agents may be lazier.

An intelligent agent that never stops to organize itself won’t become smarter and smarter; it will only become more and more chaotic.

In the hundreds of millions of years of evolution, the human brain has reached a seemingly clumsy conclusion: intelligence must have a rhythm. Wakefulness is for sensing the world; sleep is for understanding the world. When an AI company independently arrives at the same conclusion while solving an engineering problem, it may be implying:

Intelligence has some basic overheads that you can’t get around.

Perhaps an AI that never sleeps isn’t a stronger AI. It’s just an AI that hasn’t realized it needs to sleep yet.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pin