Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:114Yaḥyá b. Sulaymān > Ibn Wahb > Yūnus > Ibn Shihāb > ʿUbaydullāh b. ʿAbdullāh > Ibn ʿAbbās

Ibn ʿAbbas said, "When the ailment of the Prophet ﷺ became worse, he said, 'Bring for me (writing) paper and I will write for you a statement after which you will not go astray.' But ʿUmar said, 'The Prophet is seriously ill, and we have got Allah's Book with us and that is sufficient for us.' But the companions of the Prophet ﷺ differed about this and there was a hue and cry. On that the Prophet ﷺ said to them, 'Go away (and leave me alone). It is not right that you should quarrel in front of me." Ibn ʿAbbas came out saying, "It was most unfortunate (a great disaster) that Messenger of Allah ﷺ was prevented from writing that statement for them because of their disagreement and noise. (Note: It is apparent from this Hadith that Ibn ʿAbbas had witnessed the event and came out saying this statement. The truth is not so, for Ibn ʿAbbas used to say this statement on narrating the Hadith and he had not witnessed the event personally. See Fath Al-Bari Vol. 1, p.220 footnote.) (See Hadith No. 228, Vol. 4).  

البخاري:١١٤حَدَّثَنَا يَحْيَى بْنُ سُلَيْمَانَ قَالَ حَدَّثَنِي ابْنُ وَهْبٍ قَالَ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ عَنِ ابْنِ عَبَّاسٍ قَالَ

لَمَّا اشْتَدَّ بِالنَّبِيِّ ﷺ وَجَعُهُ قَالَ ائْتُونِي بِكِتَابٍ أَكْتُبُ لَكُمْ كِتَابًا لاَ تَضِلُّوا بَعْدَهُ قَالَ عُمَرُ إِنَّ النَّبِيَّ ﷺ غَلَبَهُ الْوَجَعُ وَعِنْدَنَا كِتَابُ اللَّهِ حَسْبُنَا فَاخْتَلَفُوا وَكَثُرَ اللَّغَطُ قَالَ قُومُوا عَنِّي وَلاَ يَنْبَغِي عِنْدِي التَّنَازُعُ فَخَرَجَ ابْنُ عَبَّاسٍ يَقُولُ إِنَّ الرَّزِيَّةَ كُلَّ الرَّزِيَّةِ مَا حَالَ بَيْنَ رَسُولِ اللَّهِ ﷺ وَبَيْنَ كِتَابِهِ  


See similar narrations below:

Collected by Ibn Ḥibbān

ذِكْرُ إِرَادَةِ الْمُصْطَفَى ﷺ كِتْبَةَ الْكِتَابِ لِأُمَّتِهِ لِئَلَّا يَضِلُّوا بَعْدَهُ

ibnhibban:6597Ibn Qutaybah > Ibn Abū al-Sarī > ʿAbd al-Razzāq > Maʿmar > al-Zuhrī > ʿUbaydullāh b. ʿAbdullāh > Ibn ʿAbbās

[Machine] When the Prophet ﷺ arrived and there were men in the house, including Umar ibn al-Khattab, he ﷺ said, "I will write a book for you that will prevent you from ever going astray." Umar said, "The Messenger of Allah ﷺ is in excessive pain and you have the Quran, which is sufficient for us as the book of Allah." The people of the house disagreed and argued, causing a lot of noise and discussions when they were in the presence of the Messenger of Allah ﷺ . The Messenger of Allah ﷺ said, "Stand up." Ibn Abbas used to say, "All the arguments are worthless compared to the argument between the Messenger of Allah ﷺ and the writing of that book due to their differences and noise."  

ابن حبّان:٦٥٩٧أَخْبَرَنَا ابْنُ قُتَيْبَةَ حَدَّثَنَا ابْنُ أَبِي السَّرِيِّ حَدَّثَنَا عَبْدُ الرَّزَّاقِ أَخْبَرَنَا مَعْمَرٌ عَنِ الزُّهْرِيِّ عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ عَنِ ابْنِ عَبَّاسٍ قَالَ

لَمَّا حَضَرَ النَّبِيُّ ﷺ وَفِي الْبَيْتِ رِجَالٌ فِيهِمْ عُمَرُ بْنُ الْخَطَّابِ فَقَالَ ﷺ «أَكْتُبُ لَكُمْ كِتَابًا لَا تَضِلُّوا بَعْدَهُ أَبَدًا» قَالَ عُمَرُ إِنَّ رَسُولَ اللَّهِ ﷺ قَدْ غَلَبَ عَلَيْهِ الْوَجَعُ وَعِنْدَكُمُ الْقُرْآنُ حَسْبُنَا كِتَابُ اللَّهِ قَالَ فَاخْتَلَفَ أَهْلُ الْبَيْتِ وَاخْتَصَمُوا لَمَّا أَكْثَرُوا اللَّغَطَ وَالْأَحَادِيثَ عِنْدَ رَسُولِ اللَّهِ ﷺ قَالَ رَسُولُ اللَّهِ ﷺ «قُومُوا» فَكَانَ ابْنُ عَبَّاسٍ يَقُولُ «إِنَّ الرَّزِيَّةَ كُلَّ الرَّزِيَّةِ مَا حَالَ بَيْنَ رَسُولِ اللَّهِ ﷺ وَبَيْنَ أَنْ يَكْتُبَ لَهُمْ ذَلِكَ الْكِتَابَ مِنَ اخْتِلَافِهِمْ وَلَغَطِهِمْ»