I should note that this deals with one who realizes in the middle of shmoneh esrai that he has made a mistake. Rabbi Kaganoff does not speak about someone who has already begun Retzai (and Modim anachnu lach) or someone who has finished the entire Shemona Esrai before realizing his mistake. As always, since it is a machlokes, CYLOR to see what your rav says.
In any case, may you have the zechus to have this only be a theoretical question.
There is a machlokes between those who say that one goes back to Ata Yatzarta again and those who say that one adds the specific Rosh Chodesh sections to the Shabbos sections that were already said. Rabbi Kaganoff goes into detail on this. His opinion is that we do not go back as one is not supposed to repeat the parts that he actually said. However, this leads to a somewhat complicated method of "fixing" the shmonah esrai that he then explains in detail.
I once edited an article in which the author quoted several
anthologies, each of which ruled that someone who realizes he is
saying Tikanta Shabbos on Shabbos Rosh Chodesh should immediately stop
where he is, and go to the beginning of Atah Yatzarta, and recite the
entire bracha. However, I believe that this ruling is in error. I will
explain shortly why I believe that this answer is erroneous. But
first…
I attempted to trace the sources quoted in the article to see if
perhaps I was missing some logic or information that I would clarify
in the course of my research.
What I did discover was that each source was simply quoting a
previous one, and that they all traced to one obscure 19th century
work, which did not explain at all the reason for the ruling.
I will now explain why I believe this ruling is in error, and what
one should do. My major concern is that the approach that these works
advocate results in repeating many parts of the shemoneh esrei, and
that this repetition constitutes a forbidden interruption in the
tefillah. Furthermore, to the best of my knowledge, there is no
essential requirement to recite this middle bracha of the shemoneh
esrei precisely in order.
Obviously, one should maintain the order as is, but there is ample
evidence from major halachic authorities that, in general, mistakenly
rearranging the order of a bracha is not calamitous (see, for example,
Rosh, Taanis 1:1; Shu”t Igros Moshe, Orach Chayim 4:18 and 4:70:14).
Thus, when left with the choice of rearranging the order of a bracha
to avoid repetition, or repeating parts of the bracha and ignoring
what was already said, one should follow the first approach.
Subsequently, I realized that the position I have followed, is indeed
that of Rav Moshe Feinstein. However, it appears that, in general,
there are other halachic authorities who feel that the text of a
brocha should indeed be kept intact even when repetition will result
(see, for example, Mateh Efrayim 582:10; Mishnah Berurah 582:16; Biur
Halacha 127:2 s.v. Aval).
Based on my opinion, it appears that someone who discovers that
he/she began reciting Tikanta Shabbos rather than Atah Yatzarta should
mention only those parts of the bracha that he/she has as yet not
recited, but not repeat any theme or part of the bracha that one has
already said. Although fulfilling this may be confusing to someone
unfamiliar with the bracha, this should provide us with a valid reason
to pay more attention to the details of this bracha and understand its
different parts.
In order to explain how one does this correctly, brachos of Atah
Yatzarta and Tikanta Shabbos into their constituent parts, so that we
can identify which parts we should not repeat. We can divide these
brachos into the following seven sections.
Shabbos Rosh Chodesh
1. The introduction – from the words Atah Yatzarta until and including the words shenishtalcha (some recite the text hashelucha)
bemikdashecha.
Regular Shabbos
1. The introduction – from the words Tikanta Shabbos until and including the word kara’ui.
Shabbos Rosh Chodesh
2. The prayer for our return – beginning with the words Yehi Ratzon – until (and including) the word kehilchasam.
Regular Shabbos
2. The prayer for our return – beginning with the words Yehi Ratzon – until (and including) the word kehilchasam.
Shabbos Rosh Chodesh
3. The sentence that introduces the mention of the pesukim of the Musaf – Ve’es Musafei Yom HaShabbos Hazeh veyom Rosh Hachodesh… until
(and including) the word ka’amur.
Regular Shabbos
3. The sentence that introduces the mention of the pesukim of the Musaf – Ve’es Musaf Yom HaShabbos Hazeh… until (and including) the
word ka’amur.
Shabbos Rosh Chodesh
4. Mention of the pesukim of the korban Musaf of Shabbos.
Regular Shabbos
4. Mention of the pesukim of the korban Musaf of Shabbos.
Shabbos Rosh Chodesh
5. Mention of the pasuk of the korban Musaf of Rosh Chodesh and the passage Uminchasam… until (and including) the word kehilchasam.
Regular Shabbos
5. No equivalent
Shabbos Rosh Chodesh
6. The paragraph Yismechu Vemalchusecha that concludes with the words zeicher lemaasei vereishis.
Regular Shabbos
6. The paragraph Yismechu Vemalchusecha that concludes with the words zeicher lemaasei vereishis.
Shabbos Rosh Chodesh
7. The closing of the bracha -- Elokeinu Veilokei Avoseinu.
Regular Shabbos
7. The closing of the bracha -- Elokeinu Veilokei Avoseinu.
We should note that the closings of these middle brachos of Musaf
shemoneh esrei are very different. On Shabbos Rosh Chodesh we recite a
version that is almost identical to what we recite on a weekday Rosh
Chodesh, but we insert three passages to include Shabbos.
Parts 2, 4 and 6 of the two brachos are identical, whether it is
Shabbos or Shabbos Rosh Chodesh. Therefore, one should not repeat
these sections if one has said them already.
Part 1 on Shabbos Rosh Chodesh, Atah Yatzarta, is very different from
what we usually recite on a regular Shabbos. Therefore, someone still
in the middle of this bracha should recite this passage again.
If someone missed part 5, mention of the pesukim of Rosh Chodesh, and
is still in the middle of this bracha, he/she should recite it and
introduce it with the section 3 above, which introduces the korbanos
of the Musaf. However, if he/she already recited the pesukim of
Shabbos korban Musaf (#4) above, he should omit the reference to
Shabbos in this piece and only mention Rosh Chodesh. In the latter
case, one should change the plural Musafei to a singular Musaf since
he/she now is only mentioning the Rosh Chodesh Musaf.
Having explained the rules governing these halachos, I will now
present the conclusions in a hopefully clearer way, depending on when
you discover your mistake:
A. If you were still reciting the beginning of Tikanta Shabbos, and
had not yet reached Yehi Ratzon: Return to Atah Yatzarta and recite it
in order without any changes.
B. If you had already begun the Yehi Ratzon, but are before Ve’es
Musaf Yom HaShabbos Hazeh: Complete the Yehi Ratzon until Ve’es Musaf;
then recite Atah Yatzarta until the words Yehi Ratzon, then resume
from the words Ve’es Musafei Yom HaShabbos Hazeh Veyom Rosh Hachodesh
from the Shabbos Rosh Chodesh Musaf and continue through the rest of
the tefillah.
C. If you had just begun Ve’es Musaf Yom HaShabbos Hazeh: Add the
words Ve’es Musaf Yom Rosh Hachodesh Hazeh, and then continue in the
Shabbos Rosh Chodesh Musaf until Yismechu Vemalchusecha. Immediately
prior to saying Yismechu Vemalchusecha insert the words from Atah
Yatzarta until the words shenishtalcha bemikdashecha. Then return to
Yismechu Vemalchusecha and recite the rest of the tefillah in order.
D. If you are already in the middle of Ve’es Musaf Yom HaShabbos
Hazeh: Recite Uveyom Hashabbas… until Veniskah. Then insert the words
from Atah Yatzarta until the words shenishtalcha bemikdashecha. Then
return to the words Ve’es Musaf but say the following: Ve’es Musaf Yom
Rosh Hachodesh Hazeh until the word ka’amur. Then say Uverashei
Chadsheichem in the Shabbos Rosh Chodesh section and continue in
order.
E. If you are in the middle of Yismechu Vemalchusecha, complete it
until Zeicher lemaasei vereishis, and then insert the words from Atah
Yatzarta until the words shenishtalcha bemikdashecha. Then return to
the words Ve’es Musaf but say the following: Ve’es Musaf Yom Rosh
Hachodesh Hazeh until the word ka’amur. Then say Uverashei
Chadsheichem in the Shabbos Rosh Chodesh section. Then go to Elokeinu
Veilokei Avoseinu (after Yismechu Vemalchusecha) and finish the end of
the bracha and the davening.
F. If you are already in the middle of the closing part of the bracha
(Elokeinu Veilokei Avoseinu) complete the clause that you are saying,
and then insert the words from Atah Yatzarta until the words
shenishtalcha bemikdashecha. Then return to the words Ve’es Musaf but
say Ve’es Musaf Yom Rosh Hachodesh Hazeh until the word ka’amur. Then
say Uverashei Chadsheichem in the Shabbos Rosh Chodesh section. Then
return to chadeish aleinu beyom hashabbos hazeh es hachodesh hazeh and
finish the end of the bracha in the Shabbos Rosh Chodesh section.
If you completed the entire bracha of Tikanta Shabbos, but mentioned
in the middle of the bracha some reference to the korban Musaf of Rosh
Chodesh, you have fulfilled the requirements of this prayer and you
should continue Retzei (see Mishnah Berurah 423:6). If you completed
the bracha of Tikanta Shabbos but did not yet begin Retzeih, you
should say “vena’aseh lefanecha korban Rosh Chodesh hazeh” – “and we
shall do before You this Rosh Chodesh offering” and then continue with
Retzei (ibid.).