- Peninei Halakha
The Sages prescribed the addition of a special berakha during the ĥazan’s repetition of the Amida on fast days. This addition is inserted between the berakhot of Go’el Yisrael and Refa’einu at Shaĥarit and Minĥa. It is only recited when there are at least six people in the congregation who are fasting, and the ĥazan must be one of them (sa 566:5).
During the silent Amida, Aneinu is not recited as a separate berakha, but rather as an insertion in the middle of Shome’a Tefila (Ta’anit 13b). There are various customs regarding when we recite Aneinu. Some say that Aneinu should be recited in all three of the daily prayers; even though we do not fast at night, one should recite it in Ma’ariv because the day as a whole is called a fast day. Yemenite Jews and members of some Sephardic communities follow this custom. Some Sephardic communities have the custom to recite Aneinu only while they are fasting. Therefore, on the minor fasts they recite it in Shaĥarit and Minĥa, and on Tisha Be-Av they recite it in Ma’ariv as well (based on Ha-ma’or, Kaf Ha-ĥayim 565:17). Ashkenazim customarily recite Aneinu in Minĥa only, out of concern that one may become weak and break his fast after Shaĥarit. Then, his statement “on our fast day” will turn out to be a lie. Therefore, they recite Aneinu only at Minĥa, because one who has fasted this long will probably complete the fast (based on the Ge’onim and Rashi; Rema 565:3). Everyone should follow his family custom.
One who eats less than a kezayit or drinks less than melo lugmav is considered to still be fasting and should recite Aneinu. But if one ate or drank more than that, he has broken his fast and may not recite Aneinu. (Nonetheless, he must continue fasting, as mentioned above, section 6.)
 sa 566:3 states that the ĥazan recites Aneinu only if there are ten people present who are fasting. However, many Aĥaronim explain that this is true only if a particular community establishes a fast day, but regarding the four fasts that the Prophets instituted, six people fasting are sufficient. See mb 566:14. When there are fewer than six people fasting, the ĥazan should recite Aneinu in Shome’a Tefila, as an individual would.
If the ĥazan forgets to recite Aneinu and has not yet said God’s name at the end of Refa’einu, he should go back and recite Aneinu in its proper place. If, however, he has already said God’s name, he should recite Aneinu in Shome’a Tefila, as an individual would. If he forgets to insert it even there, he should recite it, without its conclusion “Blessed are You…Who answers in time of distress,” after “…Who blesses His people Israel with peace,” before he says, “Yiyhu le-ratzon” (“May the words of my mouth…”; mb 119:19). An individual who forgets to recite Aneinu in Shome’a Tefila should insert it in the supplications that follow the Amida.
 There are varying opinions on this issue, and mb 568:3 states, based on Nehar Shalom, that one should recite Aneinu. In bhl 565:1, however, he cites Ma’amar Mordechai’s opinion that one who eats on a fast day should not recite Aneinu at all. Shevet Ha-Levi 5:60 reconciles this contradiction by explaining that one who is exempt from fasting should not recite Aneinu, whereas one who ate accidentally should recite it, because the fast applies to him. In my humble opinion, however, in light of the Ashkenazic custom not to recite Aneinu in Shaĥarit because one might not fast the entire day, we can clearly infer that one who has already eaten should not recite it. Many Sephardim have adopted this custom. Even one who merely intends to eat, but has not yet done so, should not recite Aneinu (sa 562:1; see mb ad loc. 6).
It is also unclear how much one needs to eat in order to be viewed as no longer fasting. Regarding Yom Kippur, the Sages say that eating a date’s bulk of food within the time it takes to eat half a loaf of bread, or drinking melo lugmav of fluid, is enough to eliminate the pangs of fasting. However, sa 568:1 states that one who eats a kezayit of food in the time it takes to eat half a loaf of bread has broken his fast, as a kezayit is the standard measure for all eating-related laws. See Piskei Teshuvot 568:1, which explains that the Aĥaronim debate the matter. Since there is uncertainty regarding this issue, it is better to be passive and not recite Aneinu if one ate a kezayit of food.