Anthropic mistakenly releases Claude Code agent source code in npm package
Anthropic confirmed that a recent version of Claude Code’s npm package accidentally included internal source code files. The incident occurred on the morning of April 1, 2026 with the release of version 2.1.88 of the @anthropic-ai/claude-code package. Usuários quickly identified the presence of a source map file of approximately 60 MB that allowed significant parts of the encoding agent codebase to be reconstructed. The company removed the affected version from the public registry and attributed the problem to human error in the packaging process.
No sensitive customer data or credentials were exposed during the episode. The company highlighted that the case did not constitute an external security breach, but rather an internal configuration failure during the preparation of the release. Desenvolvedores and security researchers followed the event in real time after initial publicity on online platforms.
Details of the file exposed in the release
The source map file included in the problematic version allowed access to around 1,900 TypeScript files and more than 512 thousand lines of code. Esse material corresponds to the structure of Claude Code, a command-line tool that uses agentic capabilities of model Claude to perform programming tasks autonomously. The package was published on the npm registry, a repository widely used by developers around the world.
Full coverage: News (EN)
The exposure occurred because ignore settings that were supposed to keep the source map internal failed to prevent its inclusion in the final build. Pesquisadores noticed that the map pointed to a compressed file hosted on Anthropic’s storage, which made it easy for anyone interested to fully download the content during the brief period in which it remained available.
- Package version 2.1.88 was removed from npm shortly after the issue was identified.
- Copies of the leaked code were quickly archived in public repositories on GitHub.
- Analysts began examining the material for insights into the agent’s architecture.
Anthropic’s reaction to the incident
The company issued an official statement through a spokesperson and confirmed that the episode resulted exclusively from human error. Medidas Additional prevention measures are being implemented to avoid similar repetitions in future software releases. Anthropic reinforced that Claude Code continues to be operational for users without interruptions related to the case.
Learn more: PlayStation 5 Pro price drop accelerates digital retail sales and eliminates global stocks
Supply chain security experts note that leaks of this type, even without exposure of AI models or customer data, can provide visibility into a company’s internal tools and workflows. Claude Code was launched in February 2025 and gained traction by adding agentic features that allow the model to perform actions on behalf of the user with different levels of autonomy.
Technical analysis of the material available
Developers who reviewed the exposed code identified references to internal tools, interaction patterns between components, and specific agent configurations. The volume of lines of code suggests a complex foundation that integrates the language model with task execution, automatic review and workflow management capabilities. Parte of the content reveals approaches used to control agent behavior in practical coding scenarios.
The incident comes at a time of accelerated growth for AI-assisted development tools. Empresas in the sector invest heavily in agents that go beyond simple code generation and start to act more independently in development environments. Anthropic positions the Claude Code as a solution that balances power with security safeguards.
On the same topic: New Apple system update optimizes urgent task management for iPhone users
Recent context of incidents in the company
This is the second episode reported in a short period of time involving accidental exposure of internal information from Anthropic. In the previous week, draft content files became publicly accessible through management tool configurations. The company treated both cases as isolated operational failures and unrelated to external attacks or misuse of its own AI tools.
Developer communities are closely watching developments, especially as npm represents a central player in the modern software supply chain. Qualquer Packaging failure in this ecosystem can quickly propagate between dependent projects. Anthropic stated that it works to strengthen review processes before new publications.
Potential impact to the AI ecosystem
Access to the Claude Code code allows researchers and practitioners to closely examine agent orchestration mechanisms, tool management, and unwanted behavior containment strategies. Embora the core language model has not been exposed, the architecture around it offers clues about how Anthropic structures complex interactions between AI and external systems.
Follow: all about anthropopic claude code
The tool gained prominence by allowing Claude to perform tasks with less need for human intervention in certain modes. Analistas point out that the leak could accelerate discussions about security practices in AI product releases, especially those involving agentic components with the potential for autonomous action.
Anthropic continues to develop Claude Code and expand its capabilities within defined limits. The episode serves as a reminder of the importance of strict controls at all stages of software distribution, even in companies that are leading advances in artificial intelligence.

















