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
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."
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
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.
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.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
