When the Messenger of Allah ﷺ was on the verge of death, he said, "Come, let me write for you a document so that you will never go astray after it." Some men were in the house, among them Umar bin Khattab.Umar said, "The Messenger of Allah ﷺ is overcome with pain, and you have the Quran. The Book of Allah is sufficient for us."The people in the house disagreed and quarreled. Some of them said, "Bring writing materials so the Messenger of Allah ﷺ may write for you." Others said what Umar had said.When their clamor and disagreement grew loud and distressed the Messenger of Allah ﷺ, he said, "Leave me."Ibn Abbas used to say, "The real calamity, the greatest calamity, was what stood between the Messenger of Allah ﷺ and his writing that document for them, namely their disagreement and clamor."
حدثنا وهب بن جرير حدثنا أبي قال سمعت يونس يحدث عن الزهري عن عبيد الله بن عبد الله
لما حضرت رسول الله ﷺ الوفاة قال هلم أكتب لكم كتابا لن تضلوا بعده وفي البيت رجال فيهم عمر بن الخطاب فقال عمر إن رسول الله ﷺ قد غلبه الوجع وعندكم القرآن حسبنا كتاب الله قال فاختلف أهل البيت فاختصموا فمنهم من يقول يكتب لكم رسول الله ﷺ أو قال قربوا يكتب لكم رسول الله ﷺ ومنهم من يقول ما قال عمر فلما أكثروا اللغط والاختلاف وغم رسول الله ﷺ قال قوموا عني فكان ابن عباس يقول إن الرزية كل الرزية ما حال بين رسول الله ﷺ وبين أن يكتب لهم ذلك الكتاب من اختلافهم ولغطهم
Its isnad is sahih. Ibn Kathir quoted it in al-Tarikh 5:227-228 from Sahih Bukhari, by way of Abdul-Razzaq, from Maamar, from Zuhri, then said, Muslim narrated it from Muhammad bin Rafi and Abd bin Humayd, both of them from Abdul-Razzaq, in similar wording. Bukhari also reported it in several places in his Sahih, from the hadith of Maamar and Yunus, from Zuhri, with the same content. See 1935, 4137, 2676, 3111.