By him, by Ahmad ibn al-Hasan by ‘Amr ibn Sa‘id by Musaddiq ibn Sadaqah by ‘Ammar ibn Musa al-Sabati:
I asked Abu Abdillah عليه السلام, peace be upon him, about forgetfulness, what cases require two prostrations of forgetfulness. Imam عليه السلام said: "If you intended to sit but stood, or intended to stand but sat, or intended to recite but instead glorified, or intended to glorify but instead recited, then you must perform two prostrations of forgetfulness. But in anything that completes the prayer, there is no forgetfulness." And (Imam عليه السلام was asked) regarding a man who intended to sit but stood up, and then remembered before initiating anything further or committing any additional act. Imam عليه السلام said: "There are no two prostrations of forgetfulness upon him until he speaks something." And (Imam عليه السلام was asked) about a man who forgets to perform the two prostrations of forgetfulness in the prayer. Imam عليه السلام said: "He should perform them whenever he remembers." And (Imam عليه السلام was asked) regarding a man who prayed three rak‘ahs thinking that they were four, and after giving salam remembered that they were only three. Imam عليه السلام said: "He builds upon his prayer whenever he remembers, performs one more rak‘ah, then recites the tashahhud, gives salam, and performs two prostrations of forgetfulness, and his prayer is valid." And Imam عليه السلام was asked about a man who forgets the bowing or forgets a prostration, whether he must perform a prostration of forgetfulness. Imam عليه السلام said: "No, he has completed the prayer." And (Imam عليه السلام was asked) regarding a man who joins the Imam (of prayer) in prayer after the Imam (of prayer) has already prayed one rak‘ah or more, and then the Imam (of prayer) makes a mistake, what should the man do? Imam عليه السلام said: "When the Imam (of prayer) gives salam and performs the two prostrations of forgetfulness, the man who joined him does not perform the prostrations. But when the man stands, continues his prayer, completes it, and gives salam, then he must perform two prostrations of forgetfulness." And (Imam عليه السلام was asked) regarding a man who makes a mistake in his prayer and does not remember it until he has prayed the Fajr prayer, what should he do? Imam عليه السلام said: "He should not perform the two prostrations of forgetfulness until the sun rises and its glare disappears." And (Imam عليه السلام was asked) regarding a man who makes a mistake behind the Imam (of prayer) and does not perform the opening takbir of prayer. Imam عليه السلام said: "He must repeat prayer, for there is no prayer without opening takbir." And (Imam عليه السلام was asked) regarding a man upon whom prayer is obligatory in a sitting position, but he forgets and stands to initiates prayer while standing, then remembers. Imam عليه السلام said: "He must sit down and initiate the prayer while sitting. Likewise, if the prayer was obligatory upon him while standing, but he forgot and initiated the prayer while sitting, then he must cut off his prayer, stand, and initiate the prayer while standing. The initial opening (takbir) he made while sitting is not counted."