One must say Ya’aleh VeYavo in Birkat HaMazone (Grace after Meals), as well. Even though one is not obligated to eat a meal on Rosh Chodesh, one must mention it when reciting Birkat HaMazone because of the importance of the day, which requires additional sacrifices (Shabbat 24a with Tosafot). Ya’aleh VeYavo is inserted in the blessing of Rachem, because both are prayers of supplication.
If one forgot to say Ya’aleh VeYavo in Birkat HaMazone, he need not repeat the prayer because one who forgets to mention the sanctity of a particular day must repeat Birkat HaMazone only on days when there is an obligation to eat a meal with bread, like Shabbat and Yom Tov. On Rosh Chodesh and Chol HaMoed, however, one is not obligated to eat such a meal. Therefore, from the perspective of the sanctity of the day, one need not recite Birkat HaMazone. Consequently, if one accidentally omitted Ya’aleh VaYavo, he need not repeat it. (Shulchan Aruch 424:1).
One who began a meal on Rosh Chodesh, and managed to eat a kezayit (olive-size) of bread before sunset, must say Ya’aleh VeYavo in Birkat HaMazone, even if he continued eating long after nightfall (“when the stars emerge”), because the meal began on Rosh Chodesh(Shulchan Aruch 188:10; some argue, see Kaf HaChaim 43).
If one began to eat on the eve of Rosh Chodesh, and finished his meal after nightfall, he must say Ya’aleh VeYavo, provided that he ate a kezayit of bread after Rosh Chodesh began (Shulchan Aruch 271:6, Mishna Berura 29).
 If one realizes that he forgot Ya’aleh VeYavo before beginning the blessing of HaTov VeHaMeitiv, our Sages decreed that he should say, “Blessed are You, Lord our God, King of the Universe Who gave New Moons to His people Israel as a remembrance” (Shulchan Aruch 188:7). According to the Bi’ur Halachah, one should say God’s Name and mention His Kingship when reciting this blessing, just as one does on Shabbat and Yom Tov. The Kaf HaChaim (31), however, maintains that God’s Name and Kingship are omitted.
 If one did not eat a kezayit of bread after the stars emerged, the Shulchan Aruch rules that he must, nonetheless, say Ya’aleh VeYavo, as is the law on Shabbat, as explained there. According to the Rama, however, he should not say it. The Acharonim also dispute the case of one who began Seudah Shlishit on Shabbat and finished his meal on Saturday night, which is the beginning of Rosh Chodesh. See Peninei Halachah, Shabbat, 6:3, note 5, p. 99.