Hadithcore
Sunan Ibn Majah, 2842
sahih· Darussalam

It was narrated that Hanzalah Al-Katib said:

“We went out to fight alongside the Messenger of Allah (ﷺ), and we passed by a slain woman whom the people had gathered around. They parted (to let the Prophet (ﷺ) through) and he said: ‘This (woman) was not one of those who were fighting.’ Then he said to a man: ‘Go to Khalid bin Walid and tell him that the Messenger of Allah (ﷺ) commands you: “Do not kill any children or women, or any (farm) laborer.’” Another chain reports a similar hadith.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنْ سُفْيَانَ، عَنْ أَبِي الزِّنَادِ، عَنِ الْمُرَقَّعِ بْنِ عَبْدِ اللَّهِ بْنِ صَيْفِيٍّ، عَنْ حَنْظَلَةَ الْكَاتِبِ، قَالَ غَزَوْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَمَرَرْنَا عَلَى امْرَأَةٍ مَقْتُولَةٍ قَدِ اجْتَمَعَ عَلَيْهَا النَّاسُ فَأَفْرَجُوا لَهُ فَقَالَ ‏(‏مَا كَانَتْ هَذِهِ تُقَاتِلُ فِيمَنْ يُقَاتِلُ‏)‏ ‏.‏ ثُمَّ قَالَ لِرَجُلٍ ‏(‏انْطَلِقْ إِلَى خَالِدِ بْنِ الْوَلِيدِ فَقُلْ لَهُ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم يَأْمُرُكَ يَقُولُ لاَ تَقْتُلَنَّ ذُرِّيَّةً وَلاَ عَسِيفًا‏)‏‏.‏ حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا الْمُغِيرَةُ بْنُ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي الزِّنَادِ، عَنِ الْمُرَقَّعِ، عَنْ جَدِّهِ، رَبَاحِ بْنِ الرَّبِيعِ عَنِ النَّبِيِّ صلى الله عليه وسلم نَحْوَهُ.‏ قَالَ أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ يُخْطِئُ الثَّوْرِيُّ فِيهِ.‏

References2 variants
In-Book Reference
Book 24, Hadith 90
English Reference
Vol. 4, Book 24, Hadith 2842