Rosh Chodesh is forbidden for fasting, as it is stated in the Yerushalmi (chapter 2, halacha 12) of Taanit: One may fast on all days, except for Shabbatot, Yamim Tovim, Rosh Chodesh, Chol HaMoed, Chanukah, and Purim. And in the Gemara Taanit (17b) it says regarding Megillat Taanit that Rosh Chodesh is from the Torah. And there are those who support this from that which is written: "And on the day of your gladness, and on your appointed festivals, and on your Roshei Chodashim," for it is juxtaposed to a festival. And Rosh Chodesh itself is called "Moed," as it is written: "He has called a Moed against me to crush my young men," and this refers to Rosh Chodesh Av. Nevertheless, our teacher, the Beit Yosef, wrote in his great book that it is not logical to say that the prohibition to fast is literally from the Torah; rather, it is very stringent, and there are supports for this from the Torah, but it is not literally de-oraita, see there. And also there is no obligation to eat bread, but only that one should not fast. Therefore, one who forgets "Ya'aleh V'Yavo" on Rosh Chodesh in Birkat HaMazon – we do not require him to repeat it.
ראש חודש אסור בתענית, כדאיתא בירושלמי (פ"ב הלכה י"ב) דתענית: בכל מתענין, חוץ משבתות, וימים טובים, וראש חודש, וחולו של מועד, וחנוכה, ופורים. ובגמרא תענית (יז ב) אומר לעניין מגילת תענית דראש חודש הוי דאורייתא. ויש שמסמיכים על מאי דכתיב: "וביום שמחתכם ובמועדיכם ובראשי חדשיכם", דהוקש למועד. וראש חודש עצמו אקרי "מועד", כדכתיב: "קרא עלי מועד לשבור בחורי", וקאי על ראש חודש אב. ומכל מקום כתב רבינו הבית יוסף בספרו הגדול, דלא מסתבר לומר שהאיסור להתענות הוה ממש מן התורה; אלא דחמירא טובא, ויש לזה אסמכתות מן התורה, אבל לא ממש דאורייתא, עיין שם. וגם אין חיוב לאכול פת, אלא רק שלא יתענה. ולכן השוכח "יעלה ויבא" בראש חודש בברכת המזון – אין מחזירין אותו.