י שָׁכַח יַעֲלֶה וְיָבֹא בְּרֹאשׁ חֹדֶשׁ בְּשַׁחֲרִית אוֹ בְּמִנְחָה, וּבְחֹל הַמּוֹעֵד, בֵּין בְּשַׁחֲרִית בֵּין בְּמִנְחָה בֵּין בְּמַעֲרִיב, אִם נִזְכַּר קוֹדֶם שֶׁאָמַר יִהְיוּ לְרָצוֹן, חוֹזֵר וּמַתְחִיל רְצֵה, וַאֲפִלּוּ אִם נִזְכַּר קוֹדֵם שֶׁהִתְחִיל מוֹדִים, כֵּיוָן שֶׁסִּיֵּם בִּרְכַּת הַמַּחֲזִיר שְׁכִינָתוֹ לְצִיּוֹן, צָרִיךְ לְהַתְחִיל רְצֵה (כְּמוֹ שֶׁכָּתַבְתִּי בְּמַשִּׁיב הָרוּחַ) אַךְ אִם נִזְכַּר קוֹדֶם בִּרְכַּת הַמַּחֲזִיר שְׁכִינָתוֹ לְצִיּוֹן, אוֹמְרוֹ שָׁם וּמְסַיֵּם וְתֶחֱזֶינָה עֵינֵינוּ וְכוּ', וְאִם לֹא נִזְכַּר עַד לְאַחַר יִהְיוּ לְרָצוֹן וְגוֹ', חוֹזֵר לְרֹאשׁ הַתְּפִלָּה. וּבְרֹאשׁ חֹדֶשׁ שָׁכַח יַעֲלֶה וְיָבֹא בְּמַעֲרִיב, בֵּין שֶׁרֹאשׁ חֹדֶשׁ הוּא בּ' יָמִים, בֵּין שֶׁאֵינוֹ אֶלָּא יוֹם א', כֵּיוָן שֶׁאָמַר בָּרוּךְ אַתָּה ה' וְהִזְכִּיר אֶת הַשֵּׁם, שׁוּב אֵינוֹ חוֹזֵר, אֶלָּא מְסַיֵּם הַמַחֲזִיר שְׁכִינָתוֹ לְצִיּוֹן וְגוֹמֵר תְּפִלָּתוֹ. וְהַטַּעַם בָּזֶה מִפְּנֵי שֶׁלֹּא הָיוּ מְקַדְּשִׁין אֵת הַחֹדֶשׁ בַּלַּיְלָה. (תכ"ב ת"צ)
10 If you forgot [to add] Yaaleh veyavo on Rosh Chodesh in the Shacharis or Minchah service, or on Chol Hamo'ed either in Shacharis, Minchah, or Maariv, if you realized [your error] before you said: Yihyu le'ratzon you should go back and begin Retzeih. Even if you remembered before you started Modim, as long as you have completed the berachah: hamachazir shechinaso letzion, you must begin [again] at Retzeih, (as we wrote, above, in regard to mashiv haruach). However, if your realized before [completing] the berachah: hamachazir shechinaso letzion, you say it there (at the point where you realized) and you conclude: vesechezena eineinu … If you did not remember until after Yihyu le'ratzon … you must go back to the beginning of Shemoneh Esrei. On Rosh Chodesh [however,] if you forgot Yaaleh veyavo in the Maariv service, whether Rosh Chodesh be two days or only one day, once you [already] said: Baruch atah Hashem, and mentioned: Hashem, you no longer need to go back, [to insert Yaaleh veyavo ] but complete [the berachah] hamachazir shechinaso letzion and [go on] to complete Shemoneh Esrei. The reason for this [allowing the completion of Shemoneh Esrei without Yaaleh veyavo ] is because [ Rosh Chodesh ] was not sanctified at night.