This tradition has been narrated by the game authority (Yazid b. Hurmus) through a different chain of transmitters with the following difference in the elucidation of one of the points raised by Najda in his letter to Ibn Abas:
The Messenger of Allah (ﷺ) used not to kill the children, so you shouldst not kill them unless you could know what Khadir had known about the child he killed, or you could distinguish between a child who would grow up to he a believer (and a child who would grow up to be a non-believer), so that you killed the (prospective) non-believer and left the (prospective) believer aside.
Reference: Sahih Muslim 1812 b In-book : Book 32, Hadith 167 USC-MSA web (English) : Book 19, Hadith 4457 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.