The Talmud (Shabbat 24a) ponders whether al ha-nissim, already presumed to be an obligatory insertion into tefillah on Chanukah (see also Rashi 21b s.v. ve'asaum and the interesting analysis of Avnei Nezer, Orach Chaim, no. 507), should also be incorporated into birkat ha-mazon. In assessing this question, the Talmud considers whether the factor of pirsumei nisa (promoting and publicizing the miracle) sufficiently elevates this rabbinic imperative to justify this requirement. The Talmud's conclusion is curiously somewhat ambiguous: "eino mazkir...ve-im ba le-hazkir mazkir be-hoda'ah - he does not recite it; if he chooses to recite it he should include it in the nodeh lecha-thanksgiving section" that parallels its venue in the context of tefillah. Evidently, this insertion is sufficiently appropriate that it does not constitute a gratuitous interruption of the typically integrated birkat ha-mazon text (see mefarhsim ad loc). At the same time, the Talmud's formulation hardly constitutes a ringing endorsement of this practice. The initial rejection and subsequent apparently begrudging allowance (depending on the understanding of "eino mazkir") is confusing.
It is reasonable to assume that the fact that there is no explicit obligation to feast on Chanukah precludes any obligation, also initially dampening the enthusiasm for this birkat ha-mazon insertion. Indeed, while there are authorities who promote the concept of a simchah during this period (Rambam's [Hilchot Chanukah 3:3] rendering of "yom tov" in Shabbat 21a) and even poskim who embrace the notion of a Chanukah seudah (see Bach (Orach Chaim 670), Taz (Orach Chaim 682) and resp. of Havot Yair's rendering of the Chanukah "mitzvah" referred to in Rosh Hashana 18b), the more normative view (see Maharam, Maharshal etc. also in Bach and Beis Yosef Orach Chaim, no. 670) perceives an important distinction between Purim and Chanukah with respect to this issue and its implication for the core focus of these respective rabbinic holidays [See Chanukah: A Yom tov of Hallel and Hoda'ah.]
In light of the gemara's equivocal stance, the fact that halachic practice has enthusiastically embraced the recitation of al ha-nissim in birkat ha-mazon is striking indeed. Rambam, for example, after recording the obligation to insert al ha-nissim into tefillah (Hilchot Tefillah 2:13, 10:14), applies the same obligation to birkat ha-mazon- "mosif...ke-derech she-mosif be-tefillah" ( Hilchot Berachot 2:6,13). While he subtly implies that the tefillah insertion is a precedent and paradigm, he does appear to equate the two! Lechem Mishneh (2:6) is puzzled by the mere fact that Rambam seems to codify a birkat ha-mazon obligation, apparently inconsistent with the Talmud's conclusion. [His suggestion that Rambam selectively accepts the authority of the Talmud Yerushalmi on this matter, is intriguing, but does not fully resolve the matter.]
The Shulchan Aruch further escalates the normative status of birkat ha-mazon's al ha-nissim by reversing the order and giving priority to this expression over the more established tefillah context: "kol shemonat yemei Chanukah omer al hanissim be-birkat ha-mazon...u-betefillah"! Moreover, he adds (citing the Tur) that one may insert this recitation as long as one has not yet articulated sheim Hashem in the next berachah. The Rema further codifies the ruling of the Kol Bo that having squandered the opportunity to integrate al ha-nissim into the hoda'ah section, one should still promote the al hannisim themes by reciting an additional "harachaman"! Evidently, notwithstanding the ambiguous Talmudic ruling, halachic authorities developed a deep conviction regarding the propriety, preference, and importance of expanding and intensifying the recitation of al ha-nissim, the text that conveys Klal Yisrael's acknowledgement and supreme appreciation for what transpired on Chanukah.
The Ravyah (no. 563, [and no. 131], also cited in Hagahot Maimuniyot, Hilchos Berachot 2:13:6) significantly advances the stature of al ha-nissim in birkat ha-mazon. He invokes the principle of "kivan de-kiblu alayhu shavyuhu ke-hov" (when the community commit to the halachic practice it becomes obligatory) applied by Behag (and others) to tefillat arvit (otherwise deemed a "reshut", a discretionary obligation) to contend that Klal Yisrael's instinctive initiative and expanded commitment has established the insertion of al ha-nissim in birkat ha-mazon as obligatory, and that its absence requires that one repeat the birkat ha-mazon!! This is particularly astonishing since the consensus view (with very minor exception of siddur R' Saadiah Gaon, and R. Shmuel cited in Hagahot Mordechai, Shabbat, no. 456) is that the omission of al ha-nissim does not trigger the repetition even of tefillah, where it is certainly mandatory!! Moreover, the problematic character of Ravyah's comparison to tefillat arvit is evident. While tefillat arvit was legislated by Yaakov Avinu and parallels biblical avodot that were completed at night in the Beit ha-Mikdash and thus, possibly has the capacity to be elevated further by commitment and practice, it is anything but obvious that the rabbinic holiday of Chanukah, and the al ha-nissim text that articulates its consequential nature qualifies similarly for such elevation.
However, we have suggested elsewhere that while the details of Chanukah are rabbinic, the stakes and implications both of the decision to wage war in response to shaat ha-shemad (a formal challenge to religious principle- see Rambam Hilchot Chanukah 3:1, Hilchot Yesodei Hatorah 5:1-3), and the subsequent ramifications of the neis pah ha-shemen and mitzvah of hadlakat neirot encompassed core biblical halachic principles, including kiddush Hashem and ahavat Hashem. Chanukah reinvigorated Klal Yisrael's special sense of providence and destiny, and deepened its bonds with Hashem, especially through the very targeted vehicles of Torah study and mitzvah observance. These themes are, of course, encapsulated in al ha-nissim, they embody the special theme of hoda'ah that defines Chanukah and the mitzvah of the nerot.
While perhaps there was initially no formal feasting requirement, the overflow of joy, ahavat Hashem, and simchah that attended this holiday may have inspired Klal Yisrael to express their abundant hakarat ha-tov and their profound appreciation for the unique bond cemented by Torah and mitzvot also through this mechanism. Some formulations (see Ravyah, Aterez Zahav on Shulchan Aruch op cit) do, in fact, emphasize the role of se'eudah and mishteh on Chanukah. Moreover, even absent this motif, it should be noted that birkat ha-mazon, the biblical hoda'ah blessing par excellence, may have come to be perceived as a particularly appropriate and opportune vehicle for maximizing and intensifying the themes of praise and thanksgiving that are so central to Chanukah. Indeed, when the gemar emphasizes that when recited, al ha-nissim should be integrated into the hoda'ah section, it may have actually opened the door for the subsequent expansion!
According to Ravyah, the very fact that this initiative and commitment of shevach and hoda'ah radiated from Am Yisrael validated it as a normative standard, one that could no longer be ignored or dismissed as voluntary or discretionary. To abstain from articulating hoda'ah and hakarat ha-tov in birkat ha-mazon once it was commonly and broadly perceived as a natural and even essential vehicle for these pivotal themes was to confound expectations, an inherent lapse of gratitude and thanksgiving! Thus, the previously discretionary hoda'ah framework of birkat ha-mazon came to demand more, due to the initiative, practice, and commitment of Am Yisrael, than the initially obligatory tefillah recitation.
Ravyah's exceptional ruling regarding the capacity of al hanissim's omission to disqualify birkat ha-mazon was rejected by the consensus of halachists. However, as we have noted, the inconceivability of ignoring and squandering the opportunity to articulate the hoda'ah of al ha-nissim, perhaps especially in the ultimate birkat hoda'ah of birkat ha-mazon, was widely embraced by the halachah. It is really no surprise that a maximalist, mehadrin posture came to be applied to the articulation of Jewish destiny, halachic commitment, Divine providence on the festival of hoda'ah.