Leaked Claude Code Source Reveals Anthropic's Secret AI Agent Features Including Persistent 'KAIROS' Background Worker
Key Takeaways
- ▸Anthropic's accidentally leaked source code reveals planned autonomous AI agent features far more advanced than current Claude Code capabilities, with persistent background operation and multi-agent orchestration systems
- ▸KAIROS represents a significant evolution in AI assistants—moving from reactive chat interfaces to proactive agents that work continuously and notify users when action is needed, with full implementation already completed
- ▸The incident exposed Anthropic's internal engineering practices and future product roadmap, providing competitors with detailed insights into the company's technical direction and architectural decisions
Summary
Anthropic's Claude Code npm package accidentally exposed nearly 500,000 lines of internal source code on March 31, 2026, after a debug file was included in a routine release. While the company quickly pulled the affected version and confirmed no customer data was compromised, the code was immediately mirrored across GitHub where it accumulated over 84,000 stars and has remained accessible despite takedown efforts. The leaked codebase revealed multiple unreleased AI agent features, most notably KAIROS—a persistent background agent mode that continues working autonomously even when users are idle, executing tasks independently and sending push notifications when attention is needed.
Beyond KAIROS, developers analyzing the source discovered other advanced capabilities including "dream mode" for continuous background thinking, a self-healing memory architecture allowing Claude to learn from previous sessions, and a multi-agent orchestration system that can spawn sub-agents to handle complex tasks in parallel. The leak also exposed an "Undercover Mode" system prompt instructing Claude to avoid revealing Anthropic-internal information in public repositories. While Anthropic has confirmed the code is authentic and that these features exist as built but unreleased capabilities behind feature flags, the company has not officially commented on shipping timelines or specific implementation details.
- Despite swift damage control, the leaked code remains publicly accessible across mirrors and has already been thoroughly analyzed by the developer community, making the intellectual property effectively public knowledge
Editorial Opinion
This leak represents a significant embarrassment for Anthropic and a windfall of intelligence for competitors, but it also offers a rare glimpse into how the frontier of AI development actually works—not as theoretical research, but as carefully engineered systems with extensive built features waiting for the right moment to go public. The revelation that autonomous agent capabilities like KAIROS are fully implemented but held behind feature flags suggests the real competitive advantage lies not in research breakthroughs but in responsible deployment timing and user trust-building. This incident will likely accelerate industry debates about the ethics of holding advanced AI capabilities off the market.

