´It was narrated from 'Ali bin Abu Talib that:` the Messenger of Allah (ﷺ) said: "The Pen is lifted from the minor, the insane person and the sleeper."
Hadith Referenceسنن ابن ماجه / كتاب الطلاق / 2042
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:ضعيف, إسناده ضعيف, قال البوصيري: ’’ ھذا إسناد ضعيف،القاسم بن يزيد ھذا مجھول و أيضًا لم يدرك علي بن أبي طالب‘‘, انوار الصحيفه، صفحه نمبر 452
Hadith Takhrij« تفرد بہ ابن ماجہ ، ( تحفة الأشراف : 10255 ) ، وقد أخرجہ : سنن الترمذی/الحدود 1 ( 1423 ) ( صحیح ) » ( دوسرے شواہد کے بناء پر یہ حدیث صحیح ہے ، اس کی سند میں القاسم بن یزید مجہول ہیں ، اور ان کی ملاقات علی رضی اللہ عنہ سے نہیں ہے )
Narrated Ali ibn Abu Talib: The Prophet ﷺ said: There are three (persons) whose actions are not recorded: a sleeper till he awakes, a boy till he reaches puberty, and a lunatic till he comes to reason. Abu Dawud said: Ibn Juraij has transmitted it from Al-Qasim bin Yazid on the authority of Ali from the Prophet ﷺ. This version adds: "and an old man who is feeble-minded. "
Shaykh Umar Farooq Saeedi
Benefits and Issues: An elderly person who has lost his senses and is not in possession of his intellect and awareness, the same ruling applies to him as well. And Allah knows best.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 4403