Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
IndustryCode / SDK · ActionableHabr AI→ original

What the Claude Code leak revealed about the future of Anthropic's AI agents

Anthropic ($380 billion valuation) leaked the entire Claude Code source code — not the result of a hack, but a configuration error in an npm package (59.8 MB). A security researcher discovered the leak, and his tweet racked up 21 million views. The company pulled the package within hours, but mirrors had already spread across the internet. Developers found 44 hidden feature flags tied to 20+ unreleased features. The headline discoveries: autonomous background thinking systems, agent memory consolidation during sleep, and Undercover Mode — a mode that forbids the AI from acknowledging its nature in commits to external repositories.

AI-processed from Habr AI; edited by Hamidun News
What the Claude Code leak revealed about the future of Anthropic's AI agents
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1KAIROS and AutoDream — autonomous background agents with periodic tick prompts for proactive action
Sleep mode — memory consolidationanalyzing the day's transcripts, resolving contradictions, and forming long-term memory
Key metric #3Anti-Distillation — injecting fake tool definitions to "poison" the training data of competitors intercepting traffic

Anthropic ($380 billion valuation) accidentally published the entire source code of Claude Code version 2.1.88 — not as the result of a hack, but due to a trivial npm package configuration error. The public archive, weighing in at 59.8 MB, contained the full source code complete with developer comments and TODO markers. A security researcher discovered the leak in the early morning hours, and his tweet racked up 21 million views. Anthropic pulled the package within hours, calling it a release packaging error, but it was too late — mirrors of the repository had already spread across the internet.

Hidden agents and background thinking

The code contains 44 feature flags concealing 20+ unreleased features. The headline discovery is KAIROS, an autonomous background agent (mentioned in the code more than 150 times). Unlike the standard Claude, which operates on request, KAIROS is designed as a persistently active background mode. It receives periodic tick prompts to determine whether proactive action is needed, keeps its own logs, and subscribes to events.

Even more intriguing is the Sleep subsystem — background memory consolidation. When the user is inactive, KAIROS launches a sleep process: it analyzes the day's transcripts, resolves contradictions, turns vague guesses into solid facts, and forms long-term memory. For complex tasks, there's a Dream Planner — a feature that delegates planning to a remote claude-opus-5-5 session with a 30-minute thinking limit.

Undercover Mode and the ethics scandal

The file undercover_mode.ts (around 90 lines) sparked outrage. The mode injects a system prompt that strictly forbids the AI from mentioning that it is artificial intelligence, and strips any Anthropic attribution from commits to external repositories. The mode activates automatically for employees and has no off switch. Defenders claim it protects codenames (like KAIROS) from leaking, but critics on Hacker News raised a fair question: if a tool is programmed to hide its identity in commits, what else is it willing to hide?

Protection against competitors and the reality of the code

The code also revealed Anti-Distillation mechanisms designed to protect against competitors recording API traffic. The first injects fake tool definitions into requests to "poison" training data for interceptors. The second cryptographically hashes chain-of-thought reasoning between tool calls, so that interceptors only get summaries rather than the full thinking process. Both mechanisms are easily bypassed using proxy servers.

Tucked away inside the terminal agent was a full-fledged tamagotchi — a project called Capybara Quest, featuring creatures like capybaras, axolotls, ghosts, and chonks. It implements gacha mechanics with rarity tiers ranging from common to legendary (a 1% drop chance), along with hats and stats for CHAOS, WISDOM, and SNARK. Judging by the date stamp friend-2026-401, this was an April Fools' joke whose release had been planned for May.

The codebase itself revealed a human side: main.tsx weighs in at 1 MB with 4,683 lines of code, the code contains 460 eslint-disable comments, 50+ DEPRECATED functions are still actively used in production, config.ts contains 9 empty catch blocks, and one error handler bears the comment "// TODO: figure out why."

Story

Key Questions Answered

What are the key details on Hidden agents and background thinking?

The code contains 44 feature flags concealing 20+ unreleased features. The headline discovery is KAIROS, an autonomous background agent (mentioned in the code more than 150 times). Unlike the standard Claude, which operates on request, KAIROS is designed as a persistently active background mode. It receives periodic tick prompts to determine whether proactive action is needed, keeps its own logs, and subscribes to events. Even more intriguing is the Sleep subsystem — background memory consolidation.

What are the key details on Undercover Mode and the ethics scandal?

The file undercover_mode.ts (around 90 lines) sparked outrage. The mode injects a system prompt that strictly forbids the AI from mentioning that it is artificial intelligence, and strips any Anthropic attribution from commits to external repositories. The mode activates automatically for employees and has no off switch.

What are the key details on Protection against competitors and the reality of the code?

The code also revealed Anti-Distillation mechanisms designed to protect against competitors recording API traffic. The first injects fake tool definitions into requests to "poison" training data for interceptors. The second cryptographically hashes chain-of-thought reasoning between tool calls, so that interceptors only get summaries rather than the full thinking process. Both mechanisms are easily bypassed using proxy servers.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

Free 2-Day Vibecoding & AI Agents Intensive

Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.

Join the waitlist →Nomad AI Workspace
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — What the Claude Code leak revealed about the future of Anthropic's AI agents https://news.hamidun.com/en/news/6288/what-the-claude-code-leak-revealed-about-the-future-of-anthr

What do you think?
Loading comments…