It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that a man asked him: "I have eaten something (forgetfully) while fasting?" He (may Allah be pleased with him) said: "There is nothing against you." He asked again: "I have also drunk water while fasting?" He (may Allah be pleased with him) replied: "Nothing is due from you." He repeated his words again and said: "I have eaten such and such things while fasting?" He (may Allah be pleased with him) said: "O my dear son, (it seems) you are not used to fasting."
Musaddad recorded it as a saying of the Companion (mawquf), and all of its narrators are trustworthy (thiqah) and reliable.
It is narrated from Sayyidah Umm Ishaq al-Ghanawiyyah (may Allah be pleased with her) that she said: "I came to the Messenger of Allah (peace and blessings be upon him), and bread and meat were brought to him (peace and blessings be upon him)." Sayyidah Umm Ishaq (may Allah be pleased with her) said: "It was my heartfelt wish to eat something from the food of the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: 'O Umm Ishaq, come near and eat.' She said: So I ate, then he (peace and blessings be upon him) gave me a bone with meat on it, and I had just raised it towards my mouth when I suddenly remembered that I was fasting. My state then was that my hand remained suspended where it was: I could neither bring myself to raise it to my mouth nor put it down. Then the Messenger of Allah (peace and blessings be upon him) called: 'O Umm Ishaq!' I said: O Messenger of Allah (peace and blessings be upon him), I was fasting. At this the Messenger of Allah (peace and blessings be upon him) said: 'Complete your fast.' Seeing this, Sayyiduna Dhul-Yadayn (may Allah be pleased with him) said (in surprise): Will she complete her fast even now, when she has eaten her fill? The Prophet (peace and blessings be upon him) said: 'This is only provision that Allah Almighty Himself sent to her.'"
Abd bin Humayd recorded it, and it has a supporting narration (shahid) from the hadith of Sayyiduna Abu Hurayrah (may Allah be pleased with him), which al-Tirmidhi recorded and graded sahih. Al-Tirmidhi also said that most scholars act upon this, and this is the view of Sufyan al-Thawri, al-Shafi'i, Ahmad and Ishaq, while Malik bin Anas (may Allah have mercy on him) said that if someone eats forgetfully in Ramadan, he must make it up; but the first view (that the fast is not broken) is more correct.