The Messenger of Allah ﷺ led us in prayer and stood up after the second rakah without sitting. We said "Subhan Allah" to alert him, but he continued. When he completed the prayer, he performed the two prostrations of forgetfulness.On another occasion he said, those behind him said "Subhan Allah," and he gestured to them to remain standing.
حدثنا يزيد أخبرنا المسعودي عن زياد بن علاقة
صلى بنا رسول الله ﷺ فنهض في الركعتين فسبحنا به فمضى فلما أتم الصلاة سجد سجدتي السهو وقال مرة فسبح به من خلفه فأشار أن قوموا
No references are available.
Its isnad is sahih. Masudi has been criticized, but he has corroborating support, and Yazid heard from him before his confusion set in. The hadith was narrated by Bukhari 3/92, no. 224, Fath, Book of Action During Prayer, chapter on what is said about forgetfulness when one stands up after two rakahs of an obligatory prayer, and Muslim 1/399, no. 570, and Abu Dawud 1/271, no. 1034, in the Book of Prayer, chapter on one who stands up after two rakahs. And Tirmidhi 2/235, no. 391, in the Book of Prayer, chapter on what is said about the two prostrations of forgetfulness, where he said, hasan sahih. And Nasai 3/19, no. 1222, in the Book of Forgetfulness, and Ibn Majah 1/381, no. 1208.