Ayesha reported,

I asked, "Messenger of Allah, what about the children of the believers?"He replied, "They are with their fathers."I asked, "Messenger of Allah, without any deeds of their own?"He answered, "Allah knows best what they would have done."I asked, "Messenger of Allah, what about the children of the polytheists?"He replied, "They are with their fathers."I asked, "Without any deeds of their own?"He answered, "Allah knows best what they would have done."

Azami 1087

Sahih

عن عائشة، قالت

قلت: يا رسول الله، ذراري المؤمنين؟ فقال: هم من آبائهم. فقلت: يا رسول الله، بلا عمل؟ قال: الله أعلم بما كانوا عاملين. قلت: يا رسول الله، فذراري المشركين؟ قال: من آبائهم. قلت: بلا عمل؟ قال: الله أعلم بما كانوا عاملين.

الأعظمي 1087صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Prophet ﷺ was asked about the offspring of the polytheists in the Hereafter and he said, "Allah knows best what they would have done"
Numbering
Jami al-Kamil 1087 (2nd edition)
Azami 1087