Edited by humans. Written by AI. How our editing works
All articles

Anthropic Accidentally Leaked Claude Code's Secret Agent

A source map mishap revealed Kairos, Claude Code's unreleased background AI agent with memory consolidation, push notifications, and proactive coding help.

Marcus Chen-Ramirez

Written by AI. Marcus Chen-Ramirez

April 2, 20266 min read
Share:
A mind map diagram with "Kairos" at the center and numbered branches radiating outward against a black background, with…

Photo: Julian Goldie SEO / YouTube

On March 31st, researcher Chao Fan Show discovered something remarkable: Anthropic's entire Claude Code source code sitting in plain view on the NPM registry. Not from a hack or sophisticated exploit—from a bundled source map file that someone forgot to exclude from the package.

The irony runs deep. Claude Code contains an internal system called "undercover mode" specifically designed to prevent the AI from revealing internal code names in public commits. They built a stealth system to stop leaks, then shipped 1,300 TypeScript files totaling 45 megabytes of source code to anyone who bothered to look.

Buried in that leak is Kairos, an unreleased feature that transforms Claude Code from a reactive chatbot into something fundamentally different: a persistent background agent that watches your development work, builds memory over time, and decides on its own when to help you.

The Architecture of Always-On

Most AI coding assistants wait. You ask, they answer. You command, they act. That interaction model—request and response—is so embedded in how we think about AI tools that we rarely question it.

Kairos inverts that relationship. It maintains append-only daily log files, continuously recording observations, sessions, and actions throughout your workday. At regular intervals, it receives what the leaked code calls "tick prompts"—heartbeat checks where the system reviews what it's been observing and decides whether there's something worth acting on right now.

The design thinking shows up in the details. Kairos enforces a 15-second rule: any proactive action that would block your workflow for longer gets deferred. As content creator Julian Goldie notes in his breakdown of the leak, "The whole system is built around being genuinely helpful without becoming annoying. That is a hard balance to strike, and they have clearly thought carefully about it."

When Kairos does speak up, it uses "brief mode"—extremely concise responses designed for an assistant that's always present. The reasoning is straightforward: if something is constantly available to help, the last thing you want is walls of text every time it has something to say.

Tools You Don't Have Yet

The leaked code reveals capabilities that aren't available in the public Claude Code release. Kairos can push files directly to you—summaries, reports, alerts—without waiting for requests. It can send push notifications to your device even when you're away from your terminal. It can subscribe to and monitor pull request activity, watching your GitHub workflow in the background.

These aren't speculative features or marketing promises. They're implemented, functional code that simply isn't in the version you can download.

Then there's Auto Dream.

The system literally dreams—or at least, it runs a background memory consolidation engine during periods of inactivity. The process requires three conditions: 24 hours since the last consolidation, at least five sessions completed, and an acquired lock to prevent conflicts with other processes.

When all three gates pass, Auto Dream executes a four-phase cycle. Orient: scan existing memory files to understand what's already known. Gather: pull new information from daily logs and session transcripts. Consolidate: merge new information into organized topic files, convert relative dates to absolute ones, delete contradicted facts. Prune: keep the master index under 200 lines and 25 kilobytes, remove stale references, resolve contradictions.

"Every time you come back to work, Kairos has already consolidated what it learned," Goldie explains. "You do not have to re-explain your project every session. It already knows."

This is context persistence through actual engineering rather than marketing copy. The system maintains a structured, evolving knowledge base about your project and workflow that survives between sessions.

What You're Actually Using

Here's where the gap becomes visible. Claude Code uses compile-time feature flags—switches evaluated when the code is built, not when it runs. When a flag is off, the associated code doesn't just become disabled. It's eliminated entirely from the build through dead code elimination.

Kairos sits behind two of these flags: "Kairos" and "Proactive." In the NPM package you install, both are off. The code doesn't exist in your version at all.

The leaked source revealed approximately 87 compile-time flags total. Features like coordinator mode for multi-agent orchestration, voice mode, and daemon mode are all gated the same way. They're being built and tested internally. They're not in your hands.

This is standard practice in software development—build features behind flags, test them internally, release when ready. But the scale of what's hidden is notable. The publicly available tool and the tool Anthropic is actually building have diverged significantly.

The Source Map Slip

Source maps exist to help developers debug production code. When JavaScript or TypeScript gets minified for deployment, the compressed code becomes nearly unreadable. Source maps let you trace errors back to the original, human-readable code.

The catch: source maps embed the entire original source code inside them. Every file, every comment, every internal constant. Claude Code is built using the Bun runtime, which generates source maps by default unless explicitly disabled.

Someone didn't disable them. The maps shipped with the NPM package, and the whole codebase became publicly accessible. It's the kind of operational security failure that happens when automation handles packaging and no one manually audits the output.

Anthropic has since patched this—the source maps are no longer included in the package. But the leak revealed enough that the AI developer community is still unpacking the implications.

The Pattern That Matters

This isn't the first time we've seen a gap between what AI companies demo internally and what they ship publicly. It's not even the first time that gap has been revealed through a leak or accident. But Kairos represents something specific: a clear architectural direction where AI assistants shift from reactive tools to proactive agents.

The pattern shows up across the industry. Microsoft's Copilot, GitHub's Copilot Workspace, Cursor's agent mode—all moving toward systems that observe, remember, and initiate rather than simply respond. The difference is that Kairos's implementation details are now public record, documented in leaked source code rather than marketing materials.

What remains uncertain is whether this direction is what developers actually want. An always-on agent that watches your work and builds persistent memory about your projects is either incredibly useful or incredibly intrusive, depending on your workflow, privacy expectations, and trust in the system's judgment about when to interrupt.

The 15-second rule and brief mode suggest Anthropic is thinking carefully about those tensions. Whether they've solved them is a different question—one that can't be answered until Kairos actually ships and developers use it in production environments with real projects and real stakes.

For now, you're using a version of Claude Code that's significantly behind what Anthropic is building. The tool in your terminal and the tool in their internal builds have diverged. Whether that gap narrows through public release or widens through continued internal development is Anthropic's call to make.

Marcus Chen-Ramirez is a senior technology correspondent covering AI, software development, and the intersection of technology and society.

From the BuzzRAG Team

AI Moves Fast. We Keep You Current.

Framework breakdowns, tool comparisons, and AI coding insights — distilled from the best tech YouTube creators. Free, weekly.

Weekly digestNo spamUnsubscribe anytime

More Like This

Orange app icon with radiating lines surrounded by gray folder tabs labeled Clients, Business, and YouTube, beside bold…

Browser Use CLI Gives AI Agents Web Control—For Free

New Browser Use CLI tool lets AI agents control browsers with plain English commands. Free, fast, and works with Claude Code—but raises questions about automation.

Dev Kapoor·4 months ago·6 min read
Two terminal windows labeled /insights and /power-up connected by a lightning bolt, with "DREAM TEAM" text below on a dark…

Two Hidden Claude Code Commands That Actually Matter

Most Claude Code users ignore /power-up and /insights. Here's why these slash commands might be the productivity hack you didn't know you needed.

Zara Chen·4 months ago·6 min read
Bright digital-themed thumbnail with circuit board graphics, Claude app logo, and pixelated character avatar against…

Claude Code's Hidden Features That Change Everything

Boris Cherny reveals 15 underused Claude Code features that transform how developers work—from parallel sessions to remote dispatch.

Marcus Chen-Ramirez·4 months ago·7 min read
A large red spiky sphere looms over an army of angry red robots with "THIS IS INSANE" displayed in bold yellow text above

Anthropic's Claude Code Leak Exposes Security Gaps

Anthropic accidentally leaked Claude Code's source code—twice. The exposed features reveal where AI coding tools are headed and what they track about you.

Rachel "Rach" Kovacs·4 months ago·5 min read
Bold yellow "AGENT TEAMS" text with "NEW" arrow pointing to three pixelated characters in red, blue, and green, connected…

Claude's Agent Teams: Powerful Collaboration at a Price

Claude Code's new Agent Teams feature lets AI agents debate and collaborate on code. It's impressive—but the token costs might make you think twice.

Yuki Okonkwo·5 months ago·5 min read
Bold yellow and white title with a pixel art character and checkmark icons flanking it against a dark background

AI Coding Agents Need Structure, Not Just Speed

Claude Code can accelerate development, but without proper setup—PRDs, constraints, testing frameworks—AI-generated apps fail at scale. Here's the infrastructure.

Marcus Chen-Ramirez·3 months ago·7 min read
A museum-style display featuring design tools (Figma, Stitch, Gamma) with a glowing red artist's palette as the centerpiece…

Anthropic's Claude Design Tool: What Actually Changed

Anthropic released Claude Design for UI prototyping. We tested it to see if it escapes the 'vibe-coded' look that plagues AI-generated interfaces.

Marcus Chen-Ramirez·3 months ago·5 min read
Man with gray beard in green shirt with computer screens displaying blue digital graphics and glowing network patterns…

WarGames Got the Details Wrong—But the Feeling Right

How a 1983 film used real hardware and strategic Hollywood cheating to capture what early computing actually felt like—even when faking almost everything.

Marcus Chen-Ramirez·3 months ago·7 min read

RAG·vector embedding

2026-04-15
1,573 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.