The Rules of Forgetfulness (Sahw) in Prayer
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 50
وَ رَوَى مُحَمَّدُ بْنُ مُسْلِمٍ عَنْ أَبِي جَعْفَرٍ عَلَيْهِ اَلسَّلاَمُ: أَنَّهُ سُئِلَ عَنْ رَجُلٍ دَخَلَ مَعَ اَلْإِمَامِ فِي صَلاَتِهِ وَ قَدْ سَبَقَهُ بِرَكْعَةٍ فَلَمَّا فَرَغَ اَلْإِمَامُ خَرَجَ مَعَ اَلنَّاسِ ثُمَّ ذَكَرَ بَعْدَ ذَلِكَ أَنَّهُ قَدْ فَاتَتْهُ رَكْعَةٌ قَالَ «يُعِيدُ رَكْعَةً وَاحِدَةً.
Muhammad ibn Muslim narrated that Imam Muhammad ibn Ali Al-Baqir عليه السلام was asked about a man who entered the prayer with the Imam and was already behind by one rak'ah. When the Imam completed the prayer and left with the congregation, the man remembered that he had missed one rak'ah. Imam عليه السلام said: "He should repeat one rak'ah."
- Ṣaḥīḥ al-Faqīh