An upstate New York judge resigned last month after being accused of creating a hostile work environment and warning residents of a local youth home, without their counsel present, about the possibility of jail time, a state disciplinary commission said Wednesday.

The state’s Commission on Judicial Conduct says Ambrose P. Madden, a justice for the Fenton town court in Broome County, resigned while under investigation by the disciplinary commission.