Abu Wa’il reported: It was said to Ali ibn Abi Talib, may Allah be pleased with him, “Will you not appoint a successor upon us?” Ali said, “The Messenger of Allah, peace and blessings be upon him, did not appoint a successor, so I will not appoint a successor, but if Allah intends good for people, then He will gather them after me upon the best of them, just as the He gathered them after their Prophet upon the best of them.”
Source: al-Mustadrak ‘alá al-Ṣaḥīḥayn 4467
Grade: Jayyid (very good) according to Ibn Kathir
عَنْ أَبِي وَائِلٍ قَالَ قِيلَ لِعَلِيِّ بْنِ أَبِي طَالِبٍ رَضِيَ اللَّهُ عَنْهُ أَلَا تَسْتَخْلِفُ عَلَيْنَا قَالَ مَا اسْتَخْلَفَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ فَأَسْتَخْلِفُ وَلَكِنْ إِنْ يُرِدُ اللَّهُ بِالنَّاسِ خَيْرًا فَسَيَجْمَعَهُمْ بَعْدِي عَلَى خَيْرِهِمْ كَمَا جَمَعَهُمْ بَعْدَ نَبِيِّهِمْ عَلَى خَيْرِهِمْ
4467 المستدرك على الصحيحين كتاب معرفة الصحابة رضي الله عنهم
5/220 المحدث ابن كثير خلاصة حكم المحدث إسناده جيد في البداية والنهاية