The Messenger of Allah (ﷺ) said: There are three (persons) whose actions are not recorded…

Sunan Abu Dawud Book 40 Hadith 48

Sunan Abu Dawud #4398

Prescribed Punishments (Kitab Al-Hudud) 40:48

Narrated Aisha, Ummul Mu'minin:

The Messenger of Allah (ﷺ) said: There are three (persons) whose actions are not recorded: a sleeper till he awakes, an idiot till he is restored to reason, and a boy till he reaches puberty.

Chapter: If an insane person steals or commits a crime that is subject to a had

Grade: Sahih (Al-Albani)