Anthropic confirmed that the full source code of its Claude Code AI coding assistant was inadvertently published to npm on March 31 after a build toolchain error left source map files in the release package. Intern Chaofan Shou at Solayer Labs spotted version 2.1.88 contained .map files that exposed nearly 2,000 TypeScript files and 512,000 lines of code. Within hours, the codebase was mirrored across GitHub and analyzed by thousands of developers.
The fallout escalated when Anthropic filed DMCA takedown notices that accidentally removed thousands of unrelated GitHub repositories, a move the company called an overly broad automated error. Anthropic stated that no sensitive customer data or credentials were exposed and characterized the incident as a packaging mistake, not a security breach. The affected npm version was pulled within three hours.
Security researchers also flagged that users who installed Claude Code between 00:21 and 03:29 UTC on March 31 may have pulled a trojanized version containing a remote access trojan, though Anthropic has not confirmed this claim. The leak has reignited debate over whether AI companies should open-source their developer tools rather than risk accidental exposure.
