The Messenger of Allah ﷺ said, "When the spirit was breathed into Adam and reached his head, he sneezed and said, 'All praise belongs to Allah, Lord of the worlds.' Then said to him, 'May Allah have mercy on you.'"
أن رسول الله ﷺ قال: لما نفخ في آدم فبلغ الروح رأسه عطس، فقال: الحمد لله رب العالمين فقال له تبارك وتعالى: يرحمك الله.
Ibn Hibban (6165) narrated it from Hasan bin Sufyan, who said, Hudba bin Khalid narrated to us, Hammad bin Salama narrated to us, from Thabit, from Anas, and he related it.There is disagreement over this hadith regarding Hammad bin Salama. Hudba bin Khalid narrated it from him in this manner as marfu. Musa bin Ismail Abu Salama Tabudhaki contradicted him, narrating it from him, from Thabit, from Anas, as mawquf, with the wording, "When the spirit was breathed into Adam and reached his nostrils, he sneezed," with the rest being the same.Hakim (4/263) recorded his hadith from Ali bin Hamshaz Adl, who said, Muhammad bin Ghalib Dabbi and Hisham bin Ali Sadusi narrated to us, they said, Musa bin Ismail Abu Salama narrated to us, Hammad bin Salama narrated to us, from Thabit, from Anas, and he related it. He said, "This is a hadith sahih in its chain according to the standard of Muslim, and even though it is mawquf, its chain is thoroughly sahih."