Anthropic, the AI company behind the Claude family of models, accidentally published the full source code of its Claude Code software tool. A debug file containing roughly 512,000 lines of code was included in a software update package and made publicly available before Anthropic removed it. The code was quickly copied and shared across the internet.
Anthropic confirmed the incident in a statement: “Earlier today, a Claude Code release included some internal source code. No sensitive customer data or credentials were involved or exposed. This was a release packaging issue caused by human error, not a security breach.”
The leaked code revealed several details about how Claude Code works internally.
Key findings from the leak:
- The software uses a layered memory system designed to keep the AI focused during long sessions, rather than storing everything it encounters.
- A feature called KAIROS points to an unreleased mode in which the tool would run as a background process, working even when the user is not actively using it.
- An “undercover mode” instructs the AI to hide any indication that it was involved when contributing to publicly visible software projects.
- The code includes tools designed to corrupt data collected by competitors attempting to copy Claude Code’s behavior by recording its activity.
Alex Kim, a developer who analyzed the leak, noted that the exposure reveals not just technical details but also internal product plans that competitors can now use to inform their own development.
Sources: VentureBeat, Alex Kim’s Blog