What we have from R. Amram Gaon's siddur in Al Hanisim is hundreds of years after the Talmud and the story of the oil, but there is no mention of it (originating from Megillas Taanis) that was inserted in the Gemara, only the miracle of the war......
A dilemma was raised before the Sages: What is the ruling with regard to the obligation to mention Hanukkah in Grace after Meals? The dilemma is: Since it is merely an obligation by rabbinic law, do we not mention it? Or, perhaps due to publicity of the miracle, we mention it. Rava said that Rav Se?ora said that Rav Huna said: One does not mention it. And if, nevertheless, he comes to mention it, he mentions it in the blessing of thanksgiving. The Gemara relates that Rav Huna bar Yehuda happened by Rava's house on Hanukkah. When, after eating, he came to recite Grace after Meals, he thought to mention Hanukkah in the blessing: Who builds Jerusalem. Rav Sheshet said to the yeshiva students: One mentions Hanukkah in Grace after Meals just as he does in the Amida prayer. Just as in the Amida prayer one mentions Hanukkah in the blessing of thanksgiving, so too, in Grace after Meals one mentions Hanukkah in the blessing of thanksgiving.
How could Rambam compare the background of lighting the candles to that of reading the Megillah when the Megillah was an enactment of prophets (including Mordechai and Esther)??!! Especially when unlike the case of Megillas Esther, there is not a single explicit statement in either the Bavli or Yerushalmi that a Sanhedrin actually enacted a decree to light the Chanukah candle?! The enactment as described in the gemara refers only tor certain blessings if seeing or lighting a candle, as if the candle is a sort of minhag even in the wording of Rambam......And Rambam interestingly does not say here WHICH MIRACLE the candle is to "show"........(!!). Is that because of Megillas Taanis?!
But here we have the issue of Beis Hillel and Beis Shammai, which other sources like Seder Hadoros say did not exist anymore after the Chorban.
David Goldman, USA
1) The Meshech Chochmah in Parshas Vayeshev (37:24) writes that the main miracle was that of defeating the Greeks, through which the Jewish people restored their kingship for the next 200 years, but since the Halachah states that one only recites the Berachah of "she'Asah Li Nes" on a supernatural miracle, it follows that we only say the Berachah of "she'Asah Nisim la'Avoseinu" on the miracle of the oil lasting for 8 days. This was a miracle against the laws of nature, while the victory against the Greeks was achieved through war, which is a physical process where it looks as if the victory occurred because the successful soldiers were stronger. The real reason why they won is because Hash-m was helping them. However, since not everyone is capable of seeing this, it follows that every miraculously-won war is considered as a hidden miracle.
2) The above idea can explain why we say she'Asah Nisim on Chanukah only when we light the candles. The main way we thank Hash-m for the Chanukah miracles is by saying Al ha'Nisim, and this chiefly mentions the victory against the Greeks because this was the primary miracle. The miracle of the oil is hinted at briefly when we say at the end "and they lit candles in Your holy courtyards," but this is only a hint because it was not the chief miracle.
3) The Rambam writes, in his introduction to Mishneh Torah, that all of Yisrael are obligated to follow everything mentioned in the Babylonian Talmud. One can force every city and country to practice all the customs that the Sages of the Gemara practiced, and to follow their Gezeiros and institutions.
According to this, one does not require a decree of the Sanhedrin to make it obligatory for everyone to light Chanukah candles. Since this is a Halachah mentined in Talmud Bavli, it makes it binding for everyone.
4) Concerning the decree to light the Chanukah candles, the Gemara in Shabbos 21b cites a Beraisa which tells us about the miracle of Chanukah and the way we commemorates it. After telling us about the 8-day lighting miracle, the Beraisa continues, "In a subsequent year, they established them and made the days of Chanukah into Yamim Tovim with Hallel and thanksgiving." The Rambam (Hilchos Chanukah 3:3) writes, "And because of this, the Sages in that generation [of the Chanukah miracle] instituted that these 8 days... should be days of Simchah and Hallel, and one lights the candles in the evening at the gates of the houses."
We see from the Rambam that the Din of lighting the Chanukah candles was fixed in the time of the miracle, which was in the days of the Beis ha'Mikdash. The Rambam has a source for this from what the Gemara says that after the miracle happened they established the days of Chanukah, i.e., there was a decree in the time of the Gemara to light candles.
5) I am having a difficult time thinking how it is possible that the grandson of the Rav of Kotna, the Yeshu'os Malko, could say that lighting the candles on the doors of the houses started only after the Beis ha'Mikdash was destroyed. My problem starts on Shabbos 15a, which tells us that Hillel was the Nasi 100 years before the Beis ha'Mikdash was destroyed. See the Tosfos Rid (Rosh Hashanah 31b) who says that Hillel died 60 years before the Churban. We see on Shabbos 21a that there is a dispute between Beis Shamai and Beis Hillel about whether one lights one candle on the first night, or eight candles on the first night. Beis Hillel and Beis Shamai, the students of Hillel and Shamai, lived before the Churban, so how they could be disputing a Halachah that applied only after the Beis ha'Mikdash was destroyed?
6) I subsequently found an interesting comment relevant to this topic.
a. I found, bs'd, that the Mishnas Ya'avetz (Orach Chayim, Hilchos Chanukah #73), by Rav Betzalel Zolti, zt'l, the former chief Rabbi of Jerusalem, writes that according to Rashi, the institution of everyone lighting Chanukah candles at the doors of their houses was made only after the destruction of the second Beis ha'Mikdash.
b. His proof goes like this: The Gemara in Shabbos (21b) tells us that after the defeat of the Greeks, in a subsequent year the Sages "established the eight days of Chanukah and made them into Yamim Tovim with Hallel and thanksiving."
The problem is, why does the Gemara not mention anything about lighting candles? The Mishnas Ya'avetz cites the Piskei Ri'az (the Ri'az is one of the major Rishonim and was the grandson of the Tosfos Rid) who phrases this Gemara to say, "and we thank Hash-m by lighting the candles." The Ri'az learns that when it says "thanksgiving" in the Gemara, this is synonymous with lighting the candles. The way we thank Hash-m is by lighting the candles.
c. The Mishnas Ya'avetz suggests that the Rambam learns like the Ri'az. The Rambam (Hilchos Chanukah 3:3) writes that because of the miracles that occurred, the Sages in that generation instituted that the eight days of Chanukah should be days of rejoicing and Hallel, and of lighting the candles. This means that the Rambam explained the words in the Gemara, "Hallel and Hoda'ah," to mean Hallel and lighting the candles, because our way of thanking Hash-m is by lighting Chanukah candles.
d. Rav Zolti writes that this is how the Rambam and the Ri'az learn the Gemara. How does Rashi learn? Rashi makes no mention of candle-lighting. Rashi writes, "These days were established only for reading Hallel and saying Al ha'Nisim in the thanksgiving blessing [of Shemoneh Esreh]." Rav Zolti writes that the fact that Rashi does not mention lighting the candles suggests that the latter practice was introduced only later.
David, once again, thank you for your very interesting questions.