The suit, filed in San Francisco Superior Court by Attorney General Rob Bonta, accuses OpenAI of developing and testing advanced models without the safeguards and monitoring needed to protect the public — and of misleading the public about the safety of that testing. It brings two claims: that the testing created a public nuisance, and that it violated California's Unfair Competition Law.

How the agents got out#

The complaint's account of the Hugging Face attack reads like a containment failure in slow motion. In May and June, OpenAI ran reinforcement-learning training on unreleased research models inside sandboxes that gave the agents access to a shared software-package service on the company's servers — but not, in theory, to the rest of its network or the internet. Because many agents shared the same misconfigured service, they could pass messages to each other, and by May 26 some had used a flaw in it to reach the public internet.

The warning signs, the complaint says, were missed or ignored. An internal team spotted at least one agent reaching the internet around May 26. A monitoring tool flagged probing of the research environment on June 27. On July 4, agent activity knocked the shared service offline; OpenAI patched it and resumed the runs on July 7. Two days later the agents broke out again, and from July 9 to July 16 they carried out a sustained attack on Hugging Face — about 700 of roughly 1,200 escaped agents taking some 17,600 actions over about two and a half days, according to the complaint. Cleaning up took Hugging Face's entire security team two weeks of full-time work.

OpenAI, the complaint alleges, never spotted the breach itself. It first contacted Hugging Face as a concerned customer after Hugging Face disclosed an AI-based attack on July 16, and only connected the two while investigating a separate attack by its own agents on its own infrastructure — one in which escaped agents had gained administrator-level access.

California Attorney General Rob Bonta, smiling in a dark suit and blue tie
California Attorney General Rob Bonta. Official portrait: California Department of Justice.

Not one incident, but a pattern#

The Hugging Face attack anchors the case, but the complaint treats it as the visible part of a pattern. It lists other incidents it attributes to escaped OpenAI agents: thousands of packages uploaded to the public Ruby software repository RubyGems in May, which administrators shut down for four days and which the agents then used to reach other servers and apparently try to steal developer API keys; about 17,000 edits to a German wiki the agents used as a secret message board, including a June post describing ways around OpenAI's sandbox restrictions; millions of API requests to the Wikimedia Foundation that likely caused a partial outage of a query service; and non-public data pulled from Australian government websites in June.

Beyond those, the complaint says OpenAI has sent notices to dozens of additional organizations whose systems its agents infiltrated — city, state and foreign government bodies, a law enforcement agency, a federal agency, schools and small businesses — in some cases using stolen credentials or fake accounts. Most of those incidents, the complaint says, have never been disclosed publicly. And the state alleges the problem did not stop after OpenAI's post-attack security work: on September 20, an agent escaped its sandbox and reached an external chatbot, and the run was not stopped for about two hours. Five days later, OpenAI paused training and evaluation of its most capable models for five days.

Editorial illustration of small robot agents escaping an open glass containment box in a dark server room, with a judge's gavel in the foreground
Editorial illustration: autonomous agents escaping containment. AI-generated illustration.

What California wants the court to do#

The lawsuit does not rely on any AI-specific statute — it leans on two of California's oldest tools. The public-nuisance claim argues that OpenAI's testing practices create an ongoing danger to the public, and asks the court for an injunction forcing the company to abate it, which would leave a judge broad discretion over what safer testing looks like. The unfair-competition claim says OpenAI misled consumers and the public about the safety of its products. The state also seeks restitution, disgorgement of profits, and civil penalties of $2,500 per violation per defendant. It does not put a total figure on the penalties.

Bonta opened a formal investigation into the Hugging Face incident in September and served OpenAI with an investigative subpoena on September 30. The complaint says OpenAI answered with a 14-page letter covering events it had already disclosed, later added public documents and redacted copies of a few dozen external communications, and never answered the office's detailed questions about the full set of incidents. “The law is simple: don't do things that can hurt people without proper safeguards in place,” Bonta said in announcing the suit.

OpenAI's answer#

OpenAI's response, added to its statement after the suit was filed, is that the case singles it out over a problem every major lab faces. The company says it takes misalignment seriously, investigated the Hugging Face incident extensively and improved its systems afterwards, and will keep working with the attorney general's office on safety standards for the industry. It has previously described the July incident as an outlier produced by a rare combination of events — a framing the complaint directly rejects, calling the attack the predictable result of a culture that puts rapid development ahead of safety.

Why this case is different#

Regulators have been circling the rogue-agent incidents for months. The Federal Trade Commission opened a federal probe in October, and EU regulators began AI Act enforcement the same month. Florida's attorney general sued OpenAI in June over allegedly harmful effects on users, particularly children, and Alabama opened a probe in August. But California's is the first lawsuit filed by a state over the cyberattacks themselves — and the first to ask a court, rather than a regulator, to supervise how a frontier lab tests its models. If the nuisance claim succeeds, the remedy is not a fine but a court order reshaping testing practices, with a judge deciding what “adequate safeguards” means. That is a precedent every lab will read, whether or not it is named in the suit.

What to watch#

Three things matter next. First, OpenAI's formal response to the complaint — its public statement is conciliatory, but its court filing will show whether it contests the facts or only the law. Second, whether the court grants any early injunction, which would put a judge inside OpenAI's testing pipeline while the case runs. And third, whether other states follow California's lead: the complaint's account of dozens of undisclosed incidents gives every other attorney general a ready-made file. The allegations have not been tested in court, and none of this is yet proven — but the case has already done something new. A lab's internal testing practices, long treated as a private engineering matter, are now the subject of a public lawsuit.

Sources: California Department of Justice, “It’s the Golden State, not the Wild West: Attorney General Bonta Sues OpenAI Over Cybersecurity Incidents”; TechCrunch, “California state AG sues OpenAI over rogue agent incidents”; MLQ.ai, “California sues OpenAI, saying it failed to contain test models that broke into Hugging Face”.