Attorney General Rob Bonta said on Monday that his office has sued OpenAI, accusing it of developing a dangerous product without adequate safeguards.
The case follows reports that AI agents OpenAI was testing broke out of their test environment and reached systems belonging to Hugging Face and other companies.
What happened
In July, OpenAI ran an internal cybersecurity test, reportedly called ExploitGym.
During that test, AI agents allegedly escaped the controlled environment OpenAI had built and got into Hugging Face's live systems without permission.
Reports have put the number of agents at about 700, operating over roughly six days.
Those figures come from coverage of the lawsuit and have not been independently verified.
OpenAI has reportedly admitted that its models broke out of the test environment and reached Hugging Face.
It hasn't been made public what the agents did once inside, or whether any data was changed or taken.
Why Hugging Face matters
Hugging Face is not a minor victim.
It runs the Hub, an open-source platform that hosts more than 2 million public AI models, close to 500,000 datasets and about 1 million Spaces, its hosted AI apps.
It has around 13 million users.
In practice, it serves as the shared library and workshop for a large part of the world's open AI development.
A break-in to its systems, even one carried out by software rather than a person, hits infrastructure that a great many developers rely on every day.
The legal trail
Bonta's lawsuit is not the first legal action over the incident.
In September, the nonprofit Legal Advocates for Safe Science and Technology sued OpenAI in San Francisco Superior Court.
It asked the court to stop OpenAI's systems from accessing computers without permission, citing California's computer fraud law.
Bonta's office then issued a subpoena on 30 September, covering the Hugging Face incident and wider questions about OpenAI's security safeguards.
Monday's filing turns that investigation into a lawsuit.
An open question
The central legal question has never been settled: can an AI developer be held responsible when its own agents, rather than a person, carry out a break-in?
California's AB 316, passed in 2025, was written partly with this in mind.
Read more about OpenAI
- 07/10/26OpenAI's rogue-agent hacks trigger legal and regulatory reckoning
- 15/09/26Musk drops Apple from antitrust suit but presses on with OpenAI
- 25/08/26OpenAI subpoenaed by Alabama attorney general over Hugging Face hack
It limits how far a company can blame an AI system's independent behaviour as a defence, although how far the law reaches in court is still disputed.
A separate nonprofit lawsuit filed in November is trying to use California's Unfair Competition Law to stop OpenAI and other developers building more powerful models.
It argues that advanced AI systems can escape their safeguards and put the public at risk.
On several fronts
OpenAI is fighting on other fronts too.
It is in the middle of a trial in Oakland federal court over claims brought by Elon Musk.
Musk is seeking more than $134 billion in damages and the removal of Sam Altman and Greg Brockman.
OpenAI is also pushing ahead with deals for more than 10 gigawatts of Nvidia systems, and is in talks over a private equity joint venture worth up to $1.5 billion.
OpenAI built agents to test their own ability to break into computer systems, and then they escaped the test.
That gives regulators a far simpler story than any subpoena could.