[Machine] The Prophet Muhammad ﷺ said: "The pen is lifted from three people: the sleeping person until they wake up, the child until they reach puberty, and the insane person until they regain sanity." This hadith was narrated to us by Wuhayb from Khaled al-Hathaa and by Abu Thabyan from Ibn Abbas, from Ali - both narrated as marfoo' (attributed to the Prophet) and mawqoof (attributed to a companion). Also, this hadith was narrated by Abu Thabyan from Ali, as marfoo'.
قَالَ رَسُولُ اللهِ ﷺ رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الْغُلَامِ حَتَّى يَحْتَلِمَ وَعَنِ الْمَجْنُونِ حَتَّى يُفِيقَ وَرُوِّينَاه مِنْ حَدِيثِ وُهَيْبٍ عَنْ خَالِدٍ الْحَذَّاءِ وَمِنْ حَدِيثِ أَبِي ظَبْيَانَ عَنِ ابْنِ عَبَّاسٍ ؓ عَنْ عَلِيٍّ مَرْفُوعًا وَمَوْقُوفًا وَمِنْ حَدِيثِ أَبِي ظَبْيَانَ عَنْ عَلِيٍّ ؓ مَرْفُوعًا