The Rules of Forgetfulness (Sahw) in Prayer
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 50
وَ رَوَى حَرِيزٌ عَنْ زُرَارَةَ عَنْ أَبِي جَعْفَرٍ عَلَيْهِ اَلسَّلاَمُ: فِي رَجُلٍ جَهَرَ فِيمَا لاَ يَنْبَغِي اَلْجَهْرُ فِيهِ أَوْ أَخْفَى فِيمَا لاَ يَنْبَغِي اَلْإِخْفَاءُ فِيهِ فَقَالَ «أَيَّ ذَلِكَ فَعَلَ مُتَعَمِّداً فَقَدْ نَقَضَ صَلاَتَهُ وَ عَلَيْهِ اَلْإِعَادَةُ وَ إِنْ فَعَلَ ذَلِكَ نَاسِياً أَوْ سَاهِياً أَوْ لاَ يَدْرِي فَلاَ شَيْءَ عَلَيْهِ وَ قَدْ تَمَّتْ صَلاَتُهُ» فَقَالَ قُلْتُ لَهُ رَجُلٌ نَسِيَ اَلْقِرَاءَةَ فِي اَلْأَوَّلَتَيْنِ فَذَكَرَهَا فِي اَلْأَخِيرَتَيْنِ فَقَالَ «يَقْضِي اَلْقِرَاءَةَ وَ اَلتَّكْبِيرَ وَ اَلتَّسْبِيحَ اَلَّذِي فَاتَهُ فِي اَلْأَوَّلَتَيْنِ فِي اَلْأَخِيرَتَيْنِ وَ لاَ شَيْءَ عَلَيْهِ.
Hariz narrated from Zurarah, from Imam Muhammad ibn Ali Al-Baqir عليه السلام regarding a man who recites aloud (Jahr) where it should not be done, or recites silently (ikhfāʾ) where it should be recited aloud. Imam عليه السلام said: "Whoever does this deliberately has invalidated his prayer and must repeat it. However, if he does so out of forgetfulness, inattentiveness, or without knowing, there is no penalty on him, and his prayer remains valid." Zurarah then asked: "What if a person forgets to recite in the first two rak’ahs (units of prayer) but remembers in the latter two?" Imam عليه السلام replied: "He should make up the recitation, takbir (saying 'Allāhu Akbar'), and tasbih (glorifications) that he missed in the first two rak’ahs during the latter two, and there is no penalty on him."
- Ṣaḥīḥ al-Faqīh, p. 46