תפילת רבי נחוניה בן הקנה- רשות או חובה
This was originally posted in question form. Reb Chaim B. and Avrohom sent in definitive answers, so the post has been re-written to incorporate their thoughts. As is often the case, new readers of this post will think that the comments are off the tracks. That's not the case. The comments got us on track.
Yasher kochachem.
The Mishna in Berachos 28b states, שטייט אין דער משנה, that Rebbi Nechunyah ben Hakanah recited a tefilla upon entering the Beis Medrash, asking for siyata dishmaya and hatzlacha in his learning, and that the entire group should learn with warmth and mutual respect.
Is this tefilla required or is it optional? I don't remember any of my Roshei Yeshiva saying this tefilla, nor do I remember the outstanding members of my cohort saying it. לא ראינו אינו ראיה, but I don't think that's the case.
*
The Mechaber in 110 states that one should say this Tefilla, and his description of the Tefilla is no different than his description of Tefillas HaDerech, so it stands to reason that either both or neither are obligatory.
OC 110:8
הנכנס לבית המדרש יתפלל יהי רצון מלפניך ה' אלהינו ואלהי אבותינו שלא אכשל בדבר הלכה וכו' וביציאתו יאמר מודה אני לפניך ה' אלהי ששמת חלקי מיושבי בית המדרש
The Mishna Berura (sk36) brings from the Rambam that this is an obligatory tefilla.
כתב הרמב"ם בפי' המשנה ואלה שתי תפלות חובה
This is the language of the Rambam in Peirush Hamishna there:
ואלה שתי התפילות חובה לכל מי שיכנס בבית המדרש לקרות שהרי לא אמרו: בכניסתו מה היה אומר כדי שיהיה סיפור למה שהיה אומר רבי נחוניא בן הקנה, ואז יהיה רשות בידינו; אבל אמר "בכניסתו מה הוא אומר", רוצה לומר כשיכנס לבית המדרש מה חייב לומר
It is possible that the reason I never saw my Roshei Yeshiva saying this is because they said the Tefilla hours earlier, when they began their day of learning at home. After all, the Mishna Berura (sk35) brings from the Taz that it should be said even when learning alone:
כתב ט"ז דה"ה מי שיושב ללמוד ביחידות ובפרט אם הגיע להוראה צריך להתפלל שלא יטעה בלימוד ובהוראה לומר על טמא טהור ועל אסור מותר
On the other hand, he then says that even a person who said it at home should add a tefilla when he comes to the Beis Medrash-
וכשהוא לומד בחבורה צריך לבקש ג"כ שלא ישמח בתקלתם ולא ישמחו בתקלתו וכדאיתא בגמרא
and I never saw this being said.I was very pleased when Avrohom sent me the Aruch HaShulchan that says clearly that the Tefilla was not said in Litvishe yeshivos.
The Aruch Hashulchan (110:16) says
ועכשיו לא נהגו בזה, ונראה משום דעכשיו הלומדים בבית המדרש אינם מורים הוראות, והרב המורה יושב בביתו
But he, too, says that a posek ought to say a modified form of the Tefilla-
אמנם גם במי שיושב ביחידות, ובפרט כשהוא מורה הוראות, כתבו שנכון שיאמר
יהי רצון מלפניך ה' אלהי ואלהי אבותי, שתאיר עיני במאור תורתך. ותצילינו מכל מכשול וטעות, הן בדיני איסור והיתר הן בדיני ממונות, הן בהוראה הן בלימוד. "גל עיני ואביטה נפלאות מתורתך". ומה ששגיתי כבר – העמידני על האמת. ואל תצל מפי דבר אמת עד מאוד. "כי ה' יתן חכמה, מפיו דעת ותבונה" ט"ז סעיף קטן ח
Avrohom also sent in citations to Rishonim (for example, the Ritva-מתני' רבי נחוניא בן הקנה היה מתפלל וכו'. איידי דאיירי מענין תפלה אייתי הא תפלה הכא ולא נפקא לן מידי ואשמועינן דמי שרוצה לומר הכי הרשות בידו) that disagree with the Rambam and say that the tefilla is optional.
So it is simply a machlokes Mishna Berura and Aruch Hashulchan, as usual involving the primacy of a minhag. As Chaim pointed out, the Aruch HaShulchan's explanation seems weak. The Rambam doesn't say חובה לכל מי שיכנס בבית המדרש להורות, he says לקרות. But it doesn't matter. The fact remains that the Aruch HaShulchan observed and reported that the minhag was not to say it.
Having said this, you still have to wonder why this Tefilla fell out of general use- nobody would say it is not good to say, and, as the Gemara in Brachos one a half blatt later (30a, twelfth line) says, מהיות טוב אל תקרי רע. After all, we do say the other tefilla or רבי נחוניה בן הקנה, the tefilla אנא בכח (attributed to him by the Rashba in 120) and that's for sure a reshus, not a chova.
It is possible that the minhag fell out of use because our nusach of Ahava Rabba makes it unnecessary.
Ahava Rabba:
אבינו אב הרחמן המרחם רחם עלינו ותן בלבנו בינה להבין ולהשכיל לשמוע ללמוד וללמד לשמור ולעשות ולקים את כל דברי תלמוד תורתך באהבה. והאר עינינו בתורתך ודבק לבנו במצותיך ויחד לבבנו לאהבה וליראה (את) שמך ולא נבוש ולא נכלם ולא נכשל לעולם ועד. כי בשם קדשך הגדול הגבור והנורא בטחנו בגילה ונשמחה בישועתך
יהי רצון מלפניך ה' אלוקי, שלא יארע דבר תקלה על ידי, ולא אכשל בדבר הלכה, וישמחו בי חברי, ולא אומר על טמא טהור ולא על טהור טמא,ולא אומר על מותר אסור ועל אסור מותר, ולא יכשלו חברי בדבר הלכה ואשמח בהם
Nothing is missing. We have incorporated Reb Nechunya's tefilla into our nusach of Ahava Rabba.
Another example of this concept, where Ahava Rabba can serve as an alternative to a bracha, is Birkas HaTorah. Although lechatchila we are not supposed to rely on Ahavah Rabbah for being yotzei Birkas HaTorah (Brachos 11b, brought in OC 47,) that is only because we are supposed to use Chazal's nusach, we shouldn't be משנה ממטבע שטבעו חכמים. But there is no such din by a tefilla that we say because we heard it from Rav Nechunya ben Hakanah. It's not a "nusach" and it doesn't require exactitude. You see that from the alternative nuschaos in the Taz and Magen Avraham.
*
The Magen Avraham (60 sk2) says that Ahava Rabba was written so that we should have kavana for the Zechiros- banu bacharta=mattan Torah, keiravtanu=maamad har Sinai, leshimcha hagaddol=Amalek, lehodos=Miriam. Yetzias Mitzrayim you'll think about in the last parsha of Shma. Ahava Rabba is an amazing Bracha. Besides the lyrical beauty and emotion in its words, it is packed with halachic power; the Zechiros, Birkas HaTorah, Tefillas Rebbi Nechunya ben Hakanah, and, according to the Ramban in Brachos 22b, a Birkas Hamitzva on Krias Shma.
*
.....'רבי נחוניא בן הקנה היה מתפלל בכניסתו לבית המדרש כו
.....ואלה שתי התפילות, חובה לכל מי שיכנס בבית המדרש לקרות
ויש לו להתפלל אלה שתי התפילות יושב או עומד או כמו שיזדמן לו, ולא יחזיר פניו למזרח, ולא יברך, ולא יעשה השתחויה בהם ולא נפילת אפים. וקרא שמה תפילה על מנהג הלשון, שהוא מכנה כל בקשה תפילה
ויש לו להתפלל אלה שתי התפילות יושב או עומד או כמו שיזדמן לו, ולא יחזיר פניו למזרח, ולא יברך, ולא יעשה השתחויה בהם ולא נפילת אפים. וקרא שמה תפילה על מנהג הלשון, שהוא מכנה כל בקשה תפילה
That's an unnecessarily long list of what not to do. The only thing that's missing is that you don't have to do chazaras hashatz.
Reb Chaim B said, and I think he's right, that the Rambam is bavorning it because of the placement and language of the Mishna. The Mishna is in middle of a perek that talks specifically about Shmoneh Esrei, and the term תפלה usually means Shmoneh Esrei, and in the Mishna right after Reb Nechunya the term תפלה קצרה means Havineinu, so there's good reason to think that when the mishna says ר' נחוניא בן הקנה היה מתפלל בכניסתו לבית המדרש וביציאתו תפלה קצרה that the expression תפלה קצרה means a condensed Shmoneh Esrei type of tefilla. So the Rambam makes it clear that this is not the case. I still think that for the Rambam to say it doesn't need Mizrach or Tachanun is a little excessive, but maybe he was annoyed that the language of the Mishna was not as precise as he would have written it, so he wrote the whole list of things that are associated with Shmoneh Esrei that don't apply here.