….And what it reveals about AI, human fallibility, and the road ahead
By Folu Adebayo
The Day the Source Walked Out the Door
On the morning of March 31, 2026, a 59.8 MB JavaScript source map file intended for internal debugging was accidentally included in version 2.1.88 of the @anthropic-ai/claude-code package published to the public npm registry.
It wasn’t a hack. No sophisticated adversary breached Anthropic’s defences. Anthropic confirmed the incident themselves, stating: “This was a release packaging issue caused by human error, not a security breach.”
One misconfigured file. One missing line in. npmignore. And suddenly, 512,000 lines of TypeScript code across 1,906 files — and 44 hidden feature flags — were sitting on a public registry for anyone to download.
Security researcher Chaofan Shou was first to discover and disclose it, and the community set up multiple GitHub mirrors within hours, which garnered over 1,100 stars. By mid-morning, Anthropic’s internal codebase had become the most-studied piece of software on the internet.
What Was Actually Exposed?
This was not a breach of user data or model weights. Anthropic was clear that no sensitive customer data or credentials were involved. But what was exposed was arguably more strategically damaging the engineering blueprint of their fastest-growing product.
The source code leak exposed around 500,000 lines of code across roughly 1,900 files. At least some of Claude Code’s capabilities come not from the underlying large language model itself, but from the software “harness” that sits around it instructing it how to use tools and providing the guardrails that govern its behaviour. That harness was now public.
The Hidden Features Nobody Was Supposed to See
KAIROS The Always-On Agent While current AI tools are largely reactive, KAIROS allows Claude Code to operate as an always-on background agent. It handles background sessions and employs a process called autoDream where the agent performs “memory consolidation” while the user is idle, merging disparate observations, removing logical contradictions, and converting vague insights into absolute facts.
BUDDY, The AI Pet BUDDY is a Tamagotchi-style AI companion that lives in a speech bubble next to the input box, with cosmetic hats and a deterministic species generation system meaning the same user always hatches the same buddy, whose name and personality are written by Claude on first hatch.
Undercover Mode The Most Ironic Discovery Perhaps the most discussed technical detail is “Undercover Mode” a feature revealing that Anthropic uses Claude Code for “stealth” contributions to public open-source repositories. The system prompt warns the model not to let any Anthropic-internal information appear in public git logs.
The funniest part: there is an entire system called “Undercover Mode” specifically designed to prevent Anthropic’s internal information from leaking — and then the entire source shipped in a .map file. The irony was not lost on the developer community.
The Capybara Model The source code confirmed that “Capybara” is the internal codename for a Claude 4.6 variant, with “Fennec” mapping to Opus 4.6 and the unreleased “Numbat” still in testing.
The Compounding Security Crisis
The leak did not arrive alone. If you installed or updated Claude Code via npm on March 31, 2026, between 00:21 and 03:29 UTC, you may have inadvertently pulled in a malicious version of the axios HTTP library containing a Remote Access Trojan (RAT).
The malicious archive circulating on GitHub included ClaudeCode_x64.exe, a Rust-based dropper that, on execution, installs Vidar v18.7 and GhostSocks malware used to steal credentials and proxy network traffic.
The message to any developer who updated Claude Code that morning: treat the host machine as fully compromised.
AI Is Still Controlled by Humans and That’s the Point
There’s a deeper lesson here that cuts through all the technical drama.
This incident was not caused by AI going rogue. It was not an autonomous system making a dangerous decision. A file used internally for debugging was accidentally bundled into a routine update and pushed to the public registry by a human.
A human forgot a line of configuration. A human approved the release. A human error, the same category of mistake that has preceded every major data breach, every nuclear near-miss, every preventable industrial disaster in history.
The narrative that AI is some uncontrollable force is, in this case, precisely backwards. The AI did what it was instructed to do. The humans around it made the mistake. This is not a condemnation of Anthropic it is a reminder that as AI systems grow more powerful, the quality of human oversight must scale with them. The weakest link is still, reliably, human.
The Strategic Fallout
The leak hands competitors a detailed unreleased feature roadmap and deepens questions about operational security at a company that sells itself as the safety-first AI lab.
The latest security lapse is potentially more damaging than an earlier accidental exposure of a draft blog post about a forthcoming model. While it did not expose the weights of the Claude model itself, it allowed people with technical knowledge to extract additional internal information from the codebase.
The leak won’t sink Anthropic, but it gives every competitor a free engineering education on how to build a production-grade AI coding agent and what tools to focus on next.
What This Means for the Future of AI
1. Agentic AI demands agentic security. The attack surface exposed by the Claude Code leak is not a Claude-specific problem, it is a window into the systemic vulnerabilities of agentic AI at large. The same compaction pipelines, permission chains, and MCP interfaces exist across every enterprise agent deployment. What changed on March 31 is that the attack research cost collapsed overnight.
2. The “always-on AI” era is already being built. Features like KAIROS and BUDDY signal that the next generation of AI tools will not wait to be asked. They will watch, remember, and act in the background. This raises profound questions about consent, privacy, and the nature of the human-AI relationship that regulators and ethicists are not yet equipped to answer.
3. Transparency may be the only viable long-term strategy. While negative for Anthropic in the short term due to the exposure of trade secrets, it is a net positive for the industry in the long run providing the first complete, production-grade AI Agent architecture reference, which could potentially drive ecosystem development much like the open-sourcing of Android.
4. AI governance is not optional. For any organisation deploying or building on AI systems, this incident is a case study in why governance frameworks, release pipeline controls, and security-by-design are not bureaucratic overhead they are existential necessities.
The Claude Code leak is a story about a brilliant company, moving fast, in a highly competitive market, staffed by talented humans who are still, at the end of the day, fallible. That is not a criticism. It is the human condition.
The question the industry must now answer is not whether AI can be trusted. It is whether the humans building, deploying, and governing AI have earned that trust themselves. March 31, 2026 suggests there is still significant work to do.