The Messenger of Allah ﷺ said that Allah said, "When My servant intends to do a good deed, I record it for him as a good deed so long as he has not done it. Then if he does it, I record it for him as ten like it. And when he intends to do a bad deed, I forgive it so long as he has not done it. Then if he does it, I record it for him as one like it."
وقال رسول الله ﷺ قال الله إذا تحدث عبدي بأن يعمل حسنة فأنا أكتبها له حسنة ما لم يفعل فإذا عملها فأنا أكتبها له بعشرة أمثالها وإذا تحدث بأن يفعل سيئة فأنا أغفرها ما لم يفعلها فإذا عملها فأنا أكتبها له بمثلها
This is sahih due to the authenticity of the manuscript. It is found in the standalone manuscript under number 53, and Muslim narrated it, 1/82s/1 [Bulaq 48:1], through the route of the manuscript, and he narrated along with it the two following hadiths, 8203 and 8204. Bukhari did not narrate it through the route of the manuscript, but he narrated it, 13:391 Fath, from the copy of Araj, in similar wording, and Hafiz explained it thoroughly in Fath, alongside the hadith of Ibn Abbas with the same meaning [1:277–283]. It has already appeared in the Musnad from the copy of Araj at 7294, and its meaning has already appeared through another route at 7195. This is a hadith qudsi, as is plainly evident, but the phrase "Allah said" was not mentioned in the three original sources of the Musnad. It is established in Jami al-Masanid wal-Sunan and in the version of Muslim, and so we have added it.