A federal judge has dismissed allegations of sexual harassment levied against a former state official and the state agency he worked at, writing that his accuser waived her ability to sue over the claims in an agreement made more than two years ago.

U.S. District Judge Robert Sweet of the Southern District of New York wrote in two decisions this week that Lisa Marie Cater, a former state employee, could not levy the claims against the state and Samuel Hoyt, a former Cuomo administration official, because she agreed to forego future legal action in the settlement.