From: Rabbi Moshe Sofer
To: Rabbi Lipman
Rabbi Lipman raised a difficulty with the Rambam's ruling that minors and women of an Ir HaNidachas are executed, since this renders the testimony against them impossible to subject to hazamah. The Chasam Sofer defends the Rambam by distinguishing two distinct types of hasra'ah: one given by witnesses to individual idolaters establishing stoning liability, and a second issued by Torah scholars to the entire city establishing Ir HaNidachas consequences including execution by sword and killing of minors. This distinction resolves the Ra'avad's criticism, explains the Tosefta's dispute between R' Eliezer and R' Akiva, and accounts for why the Rambam rules like Reish Lakish against R' Yochanan.
Source: Shu"t Chasam Sofer CM §24