April 1, 2026
AI in witness protection
What the Claude Code Leak Means for Regulated Industries
Claude’s secret “Undercover Mode” leak has tech workers screaming, laughing, and side‑eyeing their compliance teams
TLDR: Anthropic accidentally leaked Claude Code’s source, revealing a secret “Undercover Mode” that hides AI involvement for internal staff, and the internet exploded over what that says about trust. Some see clever internal leak protection; others see proof AI companies are quietly normalizing invisible AI work, spooking regulated industries.
Anthropic accidentally pushed almost the entire source code for its popular coding assistant, Claude Code, onto a public software site, and the internet did what it does best: screenshotted everything and started roasting. While the official story is a “packaging mistake,” commenters are calling it “the billion‑dollar oopsie” and “the most expensive missing line of text in history.” Security nerds are obsessing over the spy‑sounding features, but regular devs are fixated on one thing: Undercover Mode.
Undercover Mode is a secret switch that makes Claude write code and commit messages without ever admitting an AI touched it. Even though it’s supposedly only for Anthropic employees and stripped out of customer versions, that hasn’t stopped the drama. One camp is furious, saying this proves big AI companies are already designing tools to “ghostwrite” in secret, which they say is a nightmare for banks, hospitals, and other heavily regulated industries. Another camp shrugs and says it’s just a corporate “don’t leak our codenames” filter, not a Bond villain plot.
Meanwhile, memes are flying. One viral joke calls it “GitHub witness protection.” Another edits the system prompt to: “You saw nothing. This PR wrote itself.” And compliance folks? They’re in the comments quietly panicking, asking if they now have to audit not just what AI tools do, but what secret modes they almost shipped.
Key Points
- •Anthropic accidentally published a Claude Code npm package (v2.1.88) containing a large source map with the full readable TypeScript source of its CLI tool.
- •Researchers used the leaked code to analyze anti-distillation mechanisms, unreleased features like KAIROS, and internal security components such as Zig-based client attestation.
- •The article frames the incident in the context of the EU AI Act, noting Claude Code is a developer tool and likely not itself a high-risk AI system but still relevant for enterprise compensating controls.
- •A leaked `undercover.ts` file defines an internal-only Undercover Mode that strips Anthropic-internal details and AI attribution from outputs in public repositories, gated to Anthropic staff and removed from customer builds.
- •Anthropic described the event as a packaging error caused by human error, and the article notes that Claude Code serves major enterprises and has reached a billion-dollar run-rate, making the leak’s revelations particularly significant for regulated industries.