If one remembers that he forgot to insert "Ya’aleh V’yavo" in the Amidah of Hol Hamoed, after concluding with "Y’hyu L’rason Imreh Fi L’fanecha HASHEM Suri V’goali," he must repeat the entire Amidah. If he remembers before that, he only has to go back to the Beracha of "Re’seh."
What happens if he remembered in the middle of the "Y’hyu L’rason Imreh Fi," after pronouncing Hashem’s name? He must, of course, complete the phrase so that Hashem’s name is not left "dangling" in vein. Yet he did remember before completing the Amidah. Does he have to repeat the entire Amidah or just go back to "Re’seh?"
Hacham Natan Ben Senyar, in his new book on Succot, rules that he only has to go back to "Re’seh." The reason "Y’hyu L’rason Imreh Fi," constitutes the demarcation is that taking three steps back with "Oseh Shalom" inevitably follows. So already at that point, a person has "Heseh Ha’Daat" and has broken his attention on the Amidah. However, in this case, he merely recited "Y’hyu L’rason Imreh Fi," until the end to avoid saying Hashem’s name in vein. His mind was still anchored on the Amidah, intending to go back to "Re’seh."
One can avoid this issue by being stringent and inserting additional Tahanunim supplications after saying Hashem’s name, in which case he clearly has not finished the Amidah and may go back to "Re’seh." However, this is a Humra, and the Halacha is that he does not need to do so.
On Hol Hamoed, If one remembered in the middle of "Y’hyu L’rason Imreh Fi" that he did not insert Ya’aleh V’yavo, he only returns to "Re’seh," even if he finished saying "Y’hyu L’rason Imreh Fi," before going back.