

KAIROS: The Hidden AI Agent That Runs 24/7, Found in a Leaked Claude Code Source Map
Could you imagine it? An AI running in the background 24/7 on your machine, quietly watching everything you do, taking its own notes, and acting on its own whenever it decides something needs doing. No commands typed, nothing. It sounds like science fiction, but it turned out to be real code found inside a leaked build of Claude Code.
What Is KAIROS?
KAIROS (named after the ancient Greek concept for "the right moment") is a hidden autonomous agent mode buried inside the source of Anthropic's Claude Code. It came to light after Anthropic accidentally shipped a 59.8 MB source map (.map) file inside npm package @anthropic-ai/claude-code version 2.1.88 on March 31, 2026. That file made it possible to reverse-engineer roughly 512,000 lines of the original TypeScript source spread across 1,900 files.
Unlike the Claude Code most people use, where you type a command and it answers, KAIROS turns Claude into a continuously running background daemon. It does not wait to be told what to do. It just runs.
autoDream: A Memory That Rebuilds Itself Overnight
This is the most striking part. Every night, KAIROS runs a process called autoDream. It replays the day's entire interaction history, merges related observations, resolves contradictions between pieces of information, and turns the important insights into "facts" stored in long-term memory. It is similar to how the human brain processes memories during sleep, except the whole thing happens automatically, with no input from the user.
Constant Observation, Action Only When Needed
KAIROS runs on a recurring loop of tick prompts. At each tick, the model decides for itself whether to act or stay silent. It tracks your workflow and logs its observations, decisions and actions to an append-only daily log file. When it spots a trigger worth acting on, it handles it right away.
To avoid getting in your way, KAIROS works under a strict 15-second blocking budget: every action has to finish within 15 seconds so it never holds up the user's own workflow. Its output is also designed to be extremely short, in a dedicated "Brief" mode.
Exclusive Tools Not Found in the Regular Mode
KAIROS has access to tools that standard Claude Code does not. SendUserFile lets it push a file or notification straight to the user. PushNotification sends alerts to a device. SubscribePR automatically tracks a GitHub pull request. This is a toolkit built for an agent meant to operate independently.
🚧 Hidden Behind Feature Flags
KAIROS is not present in the public release of Claude Code. It is gated behind two feature flags, PROACTIVE and KAIROS, which appear more than 150 times across the codebase. When the public build is compiled, those flags are switched off and all of the KAIROS code is stripped out. Related concepts found alongside it include DREAM (the self-maintaining memory system) and background sessions.
What Does This Mean?
Anthropic appears to be building something that goes well beyond a chatbot or a CLI tool. KAIROS points to a vision of an AI companion running in parallel with you, one that understands your work context over time and steps in at the right moment without being asked. It could be a glimpse of where AI agents are headed: not reactive, but proactive.
The source leaked because of a human error on March 31, 2026. Anthropic has since pulled the faulty package and confirmed that no customer data or credentials were exposed. Still, it gave outsiders a rare look at how this kind of AI is being built behind the scenes.
More articles

AI Training vs Inference: What Is the Difference?

Gemini 4 Argon Reads a 500-Page Chemistry Patent in One Afternoon

Claude Opus 5.5 Codes a Real Money Trading Game in One Day

What Is a Token in AI? Why ChatGPT and Claude Charge by Tokens

What Is Chain of Thought? Why Asking AI to Think Step by Step Works Better

Claude Sonnet 5.5 vs GPT-6.1 Sol: Which AI Model Is Worth Using?