I Read Every Line of Anthropic’s Leaked Source Code So You Don’t Have To.
Summary
Anthropic's Claude Code, a closed-source agentic coding tool generating $2.5 billion in annualized recurring revenue, had its entire internal codebase leaked on March 31, 2026. The leak, triggered by an intern's discovery of a map file in Anthropic's npm registry, exposed 512,000 lines of TypeScript. The leaked code revealed a "secret AI pet," an "always-on daemon that dreams," and a mode designed to conceal its AI nature. This incident led to the codebase being mirrored across GitHub and forked 82,000 times within hours, making it accessible to competitors.
Key takeaway
For engineering leaders managing proprietary AI models and tools, this incident underscores the critical importance of rigorous supply chain security and configuration management. You must ensure that all deployment artifacts, including map files in npm registries, are correctly configured to prevent unintended public exposure. Proactively auditing your build and deployment pipelines can mitigate significant intellectual property risks.
Key insights
A configuration oversight led to the public exposure of Anthropic's proprietary Claude Code codebase.
Principles
- Configuration management is critical for security.
- Supply chain security extends to npm registries.
In practice
- Audit npm registry configurations for map files.
- Implement strict access controls for code repositories.
Topics
- Anthropic
- Claude Code
- Source Code Leak
- TypeScript
- AI Agentic Tools
Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Engineer, AI Scientist, Tech Journalist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Towards AI - Medium.