Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:8219

[Machine] The Messenger of Allah ﷺ said, "The angels said, 'O Lord, this is your servant who intends to commit a wrong but is still able to see.' Allah said, 'Wait until he commits it; if he does, record it against him as it is, but if he refrains from it, record it for him as a good deed. He has only refrained from it due to My restraining him.'"  

أحمد:٨٢١٩

وَقَالَ رَسُولُ اللهِ ﷺ قَالَتِ الْمَلَائِكَةُ رَبِّ ذَاكَ عَبْدُكَ يُرِيدُ أَنْ يَعْمَلَ سَيِّئَةً وَهُوَ أَبْصَرُ بِهِ فَقَالَ ارْقُبُوهُ فَإِنْ عَمِلَهَا فَاكْتُبُوهَا لَهُ بِمِثْلِهَا وَإِنْ تَرَكَهَا فَاكْتُبُوهَا لَهُ حَسَنَةً إِنَّمَا تَرَكَهَا مِنْ جَرَّايَ  


See similar narrations below:

Collected by Suyūṭī
suyuti:16278a
Request/Fix translation

  

السيوطي:١٦٢٧٨a

"قالت المَلائكَةُ: رَبّ ذاكَ عبدك يريد أن يعمل بسيئةٍ وَهوَ أبْصَر بِه، فقَال: ارْقُبوه فإِنْ عَمِلَها فَاكْتُبُوهَا لهُ بِمثْلِها , وإن ترَكَهَا فاكتبوها له حَسَنَةً، إِنما تَرَكَها مِن جَرَّائى".  

[حم] أحمد [م] مسلم عن أبي هريرة