Abdullah bin Abbas reported,

Najdah al-Haruri wrote to Ibn Abbas asking him about killing children, about whom the fifth share belongs to, about when orphanhood ends for a boy, about women and whether the Prophet used to take them out to battle or have them present at fighting, and about whether a slave receives a share of the spoils.Ibn Abbas wrote back to him, "As for children, if you can distinguish the disbeliever from the believer the way Khidr did, then kill them. As for the fifth share, we used to say it belonged to us, but our people claimed it was not ours. As for women, the Messenger of Allah ﷺ used to take women out with him so they could tend to the sick and care for the wounded, but they did not take part in the fighting. As for the boy, orphanhood ends for him when he reaches puberty. As for the slave, he has no fixed share of the spoils, but he used to be given a small portion."

Ahmad 1967

Sahih

حدثنا أبو معاوية حدثنا الحجاج عن عطاء

عن ابن عباس قال

كتب نجدة الحروري إلى ابن عباس يسأله عن قتل الصبيان وعن الخمس لمن هو وعن الصبي متى ينقطع عنه اليتم وعن النساء هل كان يخرج بهن أو يحضرن القتال وعن العبد هل له في المغنم نصيب قال فكتب إليه ابن عباس أما الصبيان فإن كنت الخضر تعرف الكافر من المؤمن فاقتلهم وأما الخمس فكنا نقول إنه لنا فزعم قومنا أنه ليس لنا وأما النساء فقد كان رسول الله ﷺ يخرج معه بالنساء فيداوين المرضى ويقمن على الجرحى ولا يحضرن القتال وأما الصبي فينقطع عنه اليتم إذا احتلم وأما العبد فليس له من المغنم نصيب ولكنه قد كان يرضخ لهم

أحمد 1967صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Abbas bin Abdul-Muttalib
Numbering
Darussalam 1967
Ahmad 1967