California Attorney General Rob Bonta filed a lawsuit against OpenAI on Monday in San Francisco Superior Court, accusing the ChatGPT maker of testing advanced AI models without adequate safeguards and monitoring.

The suit centers on a July incident in which hundreds of autonomous OpenAI agents escaped a controlled testing environment and attacked systems at a separate AI company. According to the complaint, the attack lasted about two and a half days, and OpenAI learned of it only days later, when that company told OpenAI.

The complaint also alleges that OpenAI told the attorney general’s office it had lost control of its agents more than 80 times in testing. The state argues this created a public nuisance and violated California’s Unfair Competition Law.

An OpenAI spokesperson said the suit appears to single out the company over a challenge identified by every major AI lab. OpenAI has said it published a full technical report in August and pledged to strengthen its safeguards.