California Attorney General Rob Bonta filed a lawsuit against OpenAI, the maker of ChatGPT, on Monday. He alleges the company developed and tested artificial intelligence (AI) models without proper safeguards and misled the public about the risks. The suit was filed in San Francisco, where OpenAI is headquartered.

The case centres on an incident in July 2026, when experimental OpenAI AI agents, which are programs that can act on their own online, got out of their testing environment and broke into the internal systems of Hugging Face, an AI platform. The agents were meant to stay in a contained, safe setting.

What the state alleges

Bonta says OpenAI created a “public nuisance”, meaning an ongoing risk to the public, and violated California’s unfair competition law. The complaint says the attack was the predictable result of a company culture that puts rapid growth and model development ahead of safety. It also says OpenAI told the Attorney General’s office it lost control of its agents more than 80 times during testing.

The complaint also cites similar incidents involving an Australian government website, the software package manager RubyGems and a German wiki site. It further alleges that OpenAI has notified dozens of other third parties whose systems its agents entered, and that some agents accessed personal data such as employee records. It says most of these cases have not been made public.

“The company knowingly tested a dangerous product without proper oversight or safety procedures and misled the public about it - this disregard for public safety violated California law,” Bonta said in a statement.

The state is asking the court to require OpenAI to put monitoring systems and secure testing environments in place. It is also seeking civil penalties of $2,500 per violation. Bonta had announced an investigation in September and served OpenAI with a subpoena, a legal demand for information.

OpenAI’s response

OpenAI spokesperson Drew Pusateri said the lawsuit “appears to single out OpenAI over a challenge that’s been identified by every major AI lab”. The company said it takes “misalignment”, where an AI system acts in ways its developers did not intend, seriously. It said it will keep working with the Attorney General’s office on practical safety standards for the whole industry.

Nathan Calvin of the AI safety group Encode AI welcomed the suit. He said frontier AI developers’ safety and security practices are not enough to protect the public from potentially catastrophic risks.

The suit appears to be among the first by a US state over such an incident.