Al-Shāfiʿī relates in his Musnad: Al-Qāsim ibn ʿAbd Allāh ibn ʿUmar ibn Ḥafṣ told us, from Jaʿfar ibn Muḥammad, from his father, from ʿAlī ibn al-Ḥusayn, who said: “When the Messenger of Allah, peace and blessings be upon him, passed away, words of consolation were heard. A voice proclaimed: ‘With Allah there is solace for every calamity, compensation for every loss, and attainment for everything missed. Therefore put your trust in Him and place your hope in Him, for the truly stricken is the one deprived of reward.’”
Al-Ḥākim also records in his al-Mustadrak, through Abū Ḍumrah, from Jaʿfar ibn Muḥammad, from his father, from Jābir, who said: “When the Messenger of Allah, peace and blessings be upon him, passed away, the angels offered them condolences; they heard the sound yet saw no form,” and he reported something similar.
It has been mentioned earlier that they prayed over him without anyone leading them in prayer, and Allah knows best.