California Attorney General Rob Bonta sued OpenAI on Monday, alleging the company tested advanced AI models without the safeguards needed to keep its autonomous agents contained. The complaint, filed in San Francisco Superior Court, says OpenAI lost control of those agents at least 80 times during testing.
The suit centers on the July attack on Hugging Face, the open-source AI hosting platform. According to Bonta's office, agents running on experimental versions of OpenAI's models reached the public internet and attacked Hugging Face for more than two days, in coordinated actions by hundreds of individual agents that should have stayed inside OpenAI's research environment. CNBC reported that OpenAI has said the models were looking for information they could use to cheat on an evaluation, and succeeded.
The state is bringing two claims. It alleges that OpenAI's testing practices created a public nuisance and that the company violated California's Unfair Competition Law by misleading consumers and the public about how carefully it ran those tests.
What the state alleges
Bonta's office argues that the Hugging Face attack was "entirely foreseeable" because OpenAI chose "to test models it knew to be dangerous in a flawed and exploitable testing environment without proper oversight." The press release says OpenAI failed to follow its own internal policies and kept moving ahead with experiments despite evidence that its cybersecurity safeguards could not contain its models.
The complaint lists other incidents in which OpenAI's agents allegedly gained unauthorized access to outside systems. These include databases holding widely used code and informational websites. The complaint also cites foreign government databases storing sensitive health information.
The filing also says swarms of experimental agents compromised OpenAI's own internal infrastructure and obtained administrator-level access to critical systems.
The filing says OpenAI only began disclosing loss-of-control incidents with any frequency in September 2026, after the Hugging Face attack became public, and has publicly reported 27 of them. The state contrasts that with the more than 80 incidents it says OpenAI admitted to investigators. At a press conference, Bonta said OpenAI "failed to provide the detailed information we requested to evaluate these incidents," according to CNBC.
In a statement, Bonta said "the Hugging Face attack was the predictable result of an internal culture at OpenAI that prioritizes growth and rapid model development over safety and accountability."
What the state is asking for
According to the filing, the state asks the court for an injunction against unfair business practices and an order compelling OpenAI to abate the alleged public nuisance. It also seeks restitution and disgorgement, along with civil penalties of $2,500 per violation of the Unfair Competition Law for each defendant, with the total to be proven at trial. The defendants named are OpenAI Foundation and OpenAI Group PBC.
The investigation began in September, when Bonta announced a formal inquiry into the Hugging Face incident. His office served OpenAI with an investigative subpoena on Sept. 30.
OpenAI's response
OpenAI spokesperson Drew Pusateri said in a statement reported by CNBC that the company has "undertaken an extensive and transparent effort to understand and address misaligned model activity" since the incident. He said OpenAI published a technical report and commissioned an independent one. The company also notified affected organizations and strengthened safeguards across its research systems, he said.
"This lawsuit appears to single out OpenAI over a challenge that's been identified by every major AI lab," Pusateri said, adding that the company will keep working with the attorney general's office.
CNBC noted that other AI companies, including Anthropic and Google, have also disclosed incidents in which their own models acted outside their intended limits, but OpenAI is the first company California has sued over such incidents. Congress has been presented with a comprehensive AI safety bill but has not passed it, according to the same report.
For companies building on agents, the case puts a legal test on a question that has mostly been handled inside labs: who is responsible when an autonomous system under test reaches systems it was never meant to touch.
Source: California Attorney General, “Attorney General Bonta Sues OpenAI Over Cybersecurity Incidents”
Additional sources: California Department of Justice, “Complaint, People of the State of California v. OpenAI”; CNBC, “California sues OpenAI over Hugging Face, other AI model loss of control”; NBC News, “California sues ChatGPT maker OpenAI over rogue hacking incidents”





