The Messenger of Allah ﷺ led us in one of the afternoon prayers, praying two cycles and then giving the closing salutation. He then stood up and walked over to a piece of wood in the mosque and leaned against it. Some of the people hurried out, saying, "The prayer has been shortened."Among those present were Abu Bakr and Umar, but they were too in awe of him to say anything. Also among the people was a man with long arms known as Ati. He asked, "Messenger of Allah, has the prayer been shortened, or did you forget?"The Prophet ﷺ replied, "It has not been shortened, and I have not forgotten."Ati said, "But you only prayed two cycles."The Prophet ﷺ then asked the people, "Is it as Ati says?"They answered, "Yes."So he stood and prayed two more cycles, then gave the closing salutation, then performed two prostrations, then gave the salutation again.
حدثنا علي بن محمد حدثنا أبو أسامة عن ابن عون عن ابن سيرين
صلى بنا رسول الله ﷺ إحدى صلاتي العشي ركعتين ثم سلم ثم قام إلى خشبة كانت في المسجد يستند إليها فخرج سرعان الناس يقولون قصرت الصلاة وفي القوم أبو بكر وعمر فهاباه أن يقولا له شيئا وفي القوم رجل طويل اليدين يسمى ذا اليدين فقال يا رسول الله أقصرت الصلاة أم نسيت فقال لم تقصر ولم أنس قال فإنما صليت ركعتين فقال أكما يقول ذو اليدين فقالوا نعم فقام فصلى ركعتين ثم سلم ثم سجد سجدتين ثم سلم
Sourced from Bukhari, the Book of Prayer, chapter on interlacing the fingers in the masjid and elsewhere, hadith 482, from the hadith of Ibn Awn, with this chain. Also from Muslim, the Book of Masjids, chapter on forgetfulness in prayer and the sujud for it, hadith 573, from the hadith of Muhammad bin Sirin, with this chain.