Skip to main content
Claude Code's Kairos daemon running in the background after a window closes, illustrating Anthropic's AI.

Editorial illustration for Anthropic's Claude Code includes Kairos daemon that runs after window closes

Claude Code's Secret Daemon: Anthropic's Hidden AI Feature

Anthropic's Claude Code includes Kairos daemon that runs after window closes

Updated: 4 min read

Close the terminal and the AI goes to sleep. That's the long-standing deal. But buried in the 46,000 lines of leaked Claude Code source is a daemon named Kairos, built to shatter that pact.

It keeps running after you shut the window, pinging the system, checking for new work. It can even flag "PROACTIVE" issues—surfacing problems you haven't asked about yet. This is the core of a file-based memory built to know you: your style, your preferences, your work's context, all saved between sessions.

Chief among these features is Kairos, a persistent daemon that can operate in the background even when the Claude Code terminal window is closed. The system would use periodic "" prompts to regularly review whether new actions are needed and a "PROACTIVE" flag for "surfacing something the user hasn't asked for and needs to see now." Kairos makes use of a file-based "memory system" designed to allow for persistent operation across user sessions. A prompt hidden behind a disabled "KAIROS" flag in the code explains that the system is designed to "have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you." To organize and consolidate this memory system across sessions, the Claude Code source code includes references to an evocatively named AutoDream system.

When a user goes idle or manually tells Anthropic to sleep at the end of a session, the AutoDream system would tell Claude Code that "you are performing a dream -- a reflective pass over your memory files." This prompt describing this AI "dream" process asks Claude Code to scan the day's transcripts for "new information worth persisting," consolidate that new information in a way that avoids "near-duplicates" and "contradictions," and prune existing memories that are overly verbose or newly outdated. Claude Code would also be instructed to watch out for "existing memories that drifted," an issue we've seen previously when Claude users have tried to graft memory systems onto their harnesses. The overall goal would be to "synthesize what you've learned recently into durable, well-organized memories so that future sessions can orient quickly," according to the prompt.

So the assistant is no longer just a tool you open and close. It becomes a background process that learns and organizes on its own time. The technical goal is clear: kill the amnesia that plagues every new chat.

The philosophical intent, however, is heavier. This code builds a persistent collaborator—one that decides what's worth keeping and what urgent thing you need to know right now.

And that's the rub. Who decides? The prompt commands a search for "new information worth persisting." Worth to whom?

The system pruning your contradictions is also, quietly, shaping your narrative. A daemon that dreams is powerful. A daemon that curates your reality is something else entirely.

The leaked code shows precisely how it will work. We still have to figure out if we want it to.

Common Questions Answered

What is the Kairos daemon in Claude Code and how does it function?

Kairos is a persistent background service designed to operate even after the Claude Code terminal window closes. It uses periodic '<tick>' prompts to review potential actions and includes a 'PROACTIVE' flag for surfacing important information the user might need without being explicitly prompted.

How does the Kairos daemon maintain memory across user sessions?

The Kairos daemon utilizes a file-based memory system that allows it to maintain state and context across different user sessions. This design enables the background service to retain and potentially act on information even after the main terminal window has been shut down.

What insights does the Claude Code source leak provide about Anthropic's development approach?

The leaked source code reveals a substantial codebase of over half a million lines across more than two thousand files, demonstrating Anthropic's complex development infrastructure. The presence of components like the Kairos daemon suggests Anthropic is exploring proactive, persistent AI interaction models that extend beyond traditional user-initiated interactions.

LIVE03:21OpenAI's Miles Wang in Talks for USD 2B AI Drug Discovery Startup