Anthropic mistakenly releases Claude Code agent source code in npm package

Claude by Anthropic
Photo: Claude by Anthropic - gguy/ Shutterstock.com

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.

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.

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.

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.

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.

See Also News (EN)

Research reveals that parents are unaware of how their children use artificial intelligence
News (EN) • 06/04/2026

Research reveals that parents are unaware of how their children use artificial intelligence

Samsung releases new system update with new features for Galaxy Watch 4 users
News (EN) • 06/04/2026

Samsung releases new system update with new features for Galaxy Watch 4 users

Digital retail reduces the value of the Galaxy S25 5G smartphone with bank bonuses and device exchange
News (EN) • 06/04/2026

Digital retail reduces the value of the Galaxy S25 5G smartphone with bank bonuses and device exchange

Amazon’s wireless CarPlay adapter has a 50% discount and high approval ratings from drivers
News (EN) • 06/04/2026

Amazon’s wireless CarPlay adapter has a 50% discount and high approval ratings from drivers

Zach Cregger’s new Resident Evil ignores games and focuses on an unprecedented story with new characters
News (EN) • 06/04/2026

Zach Cregger’s new Resident Evil ignores games and focuses on an unprecedented story with new characters

Rumor suggests that Nintendo is preparing a special edition of the Switch 2 with a remake of Ocarina of Time
News (EN) • 06/04/2026

Rumor suggests that Nintendo is preparing a special edition of the Switch 2 with a remake of Ocarina of Time

Apple accelerates production of the iPhone 17e and develops new Air model with dual camera system
News (EN) • 06/04/2026

Apple accelerates production of the iPhone 17e and develops new Air model with dual camera system

Epic Games platform releases twelve high-budget games at no permanent cost for PC users
News (EN) • 06/04/2026

Epic Games platform releases twelve high-budget games at no permanent cost for PC users

PlayStation 5 Pro price drop accelerates digital retail sales and eliminates global stocks
News (EN) • 06/04/2026

PlayStation 5 Pro price drop accelerates digital retail sales and eliminates global stocks

New Galaxy Watch 9 firmware appears on server and confirms progress in software development
News (EN) • 05/04/2026

New Galaxy Watch 9 firmware appears on server and confirms progress in software development

Apple’s commemorative project tests cell phone with 1.1 millimeter edge and curved screen for 2027
News (EN) • 05/04/2026

Apple’s commemorative project tests cell phone with 1.1 millimeter edge and curved screen for 2027

New Apple system update optimizes urgent task management for iPhone users
News (EN) • 05/04/2026

New Apple system update optimizes urgent task management for iPhone users

Leak details hardware of the new portable PlayStation with superior graphics to the Xbox Series S
News (EN) • 05/04/2026

Leak details hardware of the new portable PlayStation with superior graphics to the Xbox Series S

Oppo officially launches the Find X9 Ultra worldwide with Hasselblad lenses and robust battery
News (EN) • 05/04/2026

Oppo officially launches the Find X9 Ultra worldwide with Hasselblad lenses and robust battery

Tim Cook reveals new iPhone and iPod prototypes in celebration of Apple’s fiftieth anniversary
News (EN) • 05/04/2026

Tim Cook reveals new iPhone and iPod prototypes in celebration of Apple’s fiftieth anniversary