Kaab bin Malik was one of the three whose repentance was accepted. Abdullah bin Abbas reported that Ali bin Abu Talib came out from the presence of the Messenger of Allah ﷺ during the illness in which he died. The people asked, "Abu Hasan, how has the Messenger of Allah ﷺ fared this morning?"Ali replied, "He has woken up, by the praise of Allah, in a state of recovery."Then Abbas bin Abdul-Muttalib took him by the hand and said to him, "By Allah, after three days you will be a slave to the staff. By Allah, I can see that the Messenger of Allah ﷺ will die from this illness of his. I recognize the faces of the sons of Abdul-Muttalib at the time of death. Let us go to the Messenger of Allah ﷺ and ask him with whom this matter of leadership will rest. If it is to be among us, we will know it, and if it is to be with others, we will know that too, and he will give instructions concerning us."Ali said, "By Allah, if we ask the Messenger of Allah ﷺ for it and he denies it to us, the people will never grant it to us after him. By Allah, I will not ask the Messenger of Allah ﷺ for it."
حدثني إسحاق أخبرنا بشر بن شعيب بن أبي حمزة قال حدثني أبي عن الزهري قال
وكان كعب بن مالك أحد الثلاثة الذين تيب عليهم أن عبد الله بن عباس أخبره أن علي بن أبي طالب رضي الله عنه خرج من عند رسول الله ﷺ في وجعه الذي توفي فيه فقال الناس يا أبا حسن كيف أصبح رسول الله ﷺ فقال أصبح بحمد الله بارئا فأخذ بيده عباس بن عبد المطلب فقال له أنت والله بعد ثلاث عبد العصا وإني والله لأرى رسول الله ﷺ سوف يتوفى من وجعه هذا إني لأعرف وجوه بني عبد المطلب عند الموت اذهب بنا إلى رسول الله ﷺ فلنسأله فيمن هذا الأمر إن كان فينا علمنا ذلك وإن كان في غيرنا علمناه فأوصى بنا فقال علي إنا والله لئن سألناها رسول الله ﷺ فمنعناها لا يعطيناها الناس بعده وإني والله لا أسألها رسول الله ﷺ