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
The recent Claude Code source leak offers a rare glimpse inside Anthropic’s upcoming developer environment. While the repository contains a slew of modules—ranging from prompt‑handling utilities to sandboxed execution layers—one component stands out for its potential impact on how users interact with the model. According to the leaked files, Anthropic has built a background service that remains active even after the main terminal window shuts down.
It periodically injects “
Below, the source comment that details the feature:
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.
What does the Claude Code leak really tell us? It shows a sizable codebase—over half a million lines across more than two thousand files—built around Anthropic’s Claude model, and it also exposes dormant components that hint at future directions. Chief among the hidden pieces is Kairos, a daemon that can persist after the terminal window closes, periodically emitting “
The presence of such a background agent suggests Anthropic is experimenting with continuous, user‑aware assistance, yet the daemon is currently disabled. Observers have noted other inactive features, but the source provides no concrete timeline for activation. Consequently, it remains unclear whether Kairos will ever become a standard part of Claude Code or if it will stay as an internal prototype.
The leak offers a rare glimpse into the scaffolding Anthropic has constructed, but without further disclosure the practical impact of these hidden modules remains uncertain.
Further Reading
- $340 billion Anthropic that wiped trillions from stock market worldwide has source code of its most-important tool leaked on internet - Times of India
- Anthropic Leak Reveals Claude Code Internal Source Code - Business Insider
- Anthropic Accidentally Releases Source Code for Claude AI Agent - Deccan Chronicle
- Claude Code Open-Sourced with 510,000 Lines of Code ... - 36Kr
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.