The Halacha is clear that since Birkat Hamazon is a Torah obligation, as the verse states, “And you shall eat and you shall be satisfied and you shall bless Hashem, your G-d,” if one is unsure whether or not one has recited Birkat Hamazon, one must recite Birkat Hamazon over again based on the rule, “When in doubt regarding a Torah law, one must act stringently.” It seems that the same should apply to one who is unsure whether or not he has recited “Retzeh Ve’Hachalitzenu” on Shabbat, for since we know that if one forgets to insert “Retzeh Ve’Hachalitzenu” one must repeat Birkat Hamazon, the same should apply that even when one is unsure, one must likewise repeat Birkat Hamazon.
Nevertheless, the truth of the matter is that although reciting Birkat Hamazon is a Torah obligation, inserting “Retzeh Ve’Hachalitzenu” is not. Many Rishonim write likewise including the Tashbetz, in his work on Masechet Berachot (49a), and others. Based on this, it would seem that when one is unsure if he has recited “Retzeh Ve’Hachalitzenu” or not, one need not repeat Birkat Hamazon based on the rule, “When in doubt regarding a rabbinic law, one acts leniently,” for according to Torah law, one has fulfilled his obligation of reciting Birkat Hamazon even without inserting “Retzeh Ve’Hachalitzenu.”
Nevertheless, the Responsa Besamim Rosh, Chapter 287 (which is attributed mostly to Rabbeinu Asher, the Rosh) states that since the assumption is that one has recited Birkat Hamazon the way one usually would during the rest of the week, we must therefore assume that one has omitted “Retzeh Ve’Hachalitzenu” and one must therefore repeat Birkat Hamazon similar to the law of one who is certain that he has not inserted “Retzeh Ve’Hachalitzenu” into Birkat Hamazon.
After dealing with this matter lengthily in his Responsa Yabia Omer (Volume 7, page 68), Maran Rabbeinu Ovadia Yosef zt”l writes that although we usually follow the assumption that one follows one’s routine with regards to prayer and the like, nevertheless, regarding Birkat Hamazon on Shabbat there is an argument which counteracts this assumption which is that since the fear of Shabbat rests on an individual on Shabbat, for on Shabbat there is indeed a unique aura and one is therefore careful not to transgress the prohibitions of Shabbat at all times, there is thus room to assume that, on the contrary, one did not forget to insert “Retzeh Ve’Hachalitzenu.” Although this is still an uncertainty, since we have already explained that inserting “Retzeh Ve’Hachalitzenu” is only a rabbinic law, we must therefore follow the rule of “When in doubt regarding a rabbinic law, one acts leniently.” Thus, halachically speaking, in our scenario one would not repeat Birkat Hamazon.
Summary: If one concludes Birkat Hamazon (after the first and second Shabbat meals) and becomes unsure whether or not he has inserted “Retzeh Ve’Hachalitzenu” into Birkat Hamazon, one will not repeat Birkat Hamazon since the essence of reciting “Retzeh Ve’Hachalitzenu” is only based on a rabbinic law. One need not be concerned that one has followed his regular weekday routine of reciting Birkat Hamazon without inserting “Retzeh Ve’Hachalitzenu” since one is surrounded by the aura of Shabbat and one may therefore assume that one did remember to insert “Retzeh Ve’Hachalitzenu.”
If after reciting “Boneh Yerushalayim” one becomes unsure whether or not one has recited “Retzeh Ve’Hachalitzenu” and one did not yet begin the blessing of “La’ad Ha’el Avinu,” one may correct this by inserting the blessing of “Baruch Ata Hashem etc. Shenatan Shabbatot etc.” as we have discussed in the previous Halacha.