|A. Shulchan Aruch (OC 188:7) writes if one realized their mistake before beginning the fourth bracha (Hatov V’Hameitiv), in place of Ya’aleh V’Yavo, a special bracha should be recited: “Baruch Atah Hashem… shenasan Roshei Chodoshim l’amo Yisroel l’zikaron.”|
After beginning the fourth bracha, one continues and does not repeat bentching. Bentching is only repeated when Ya’aleh V’Yavo is omitted on days when a seudah is obligatory. Since there is no obligation to eat a seudah in honor of Rosh Chodesh, if Ya’aleh V’Yavo is forgotten, bentching is not repeated. Even if one forgot Ya’aleh V’Yavo on Shabbos Rosh Chodesh, one does not repeat bentching, because the meal is obligated by Shabbos and not Rosh Chodesh (see Magen Avrohom 188:12).
More about this program and to subscribe visit https://oukosher.org/halacha-yomis-email/