is correct:
That is, whoever Allah has decreed will be blessed will indeed be blessed, but through the deeds by which He has made him attain blessedness. Likewise, the wretched person becomes wretched only through the deeds by which He has made him become wretched. These include relying on predestination and abandoning obligatory deeds.
As for his statement, “Deeds are not sought for their own sake, but to attain blessedness and avert wretchedness, and deeds already existed before us,” he should be asked: Is it blessedness and wretchedness themselves that have preceded, or their predetermination in knowledge, decree and recording? This is a point of confusion over which many people err, because they do not distinguish between a thing’s being established in knowledge and predetermination and its actual existence and realization. The former consists of knowing it, reporting it and recording it. None of these forms part of the thing itself or of its inherent attributes.
For this reason, many people misunderstand the Prophet’s words—may Allah bless him and grant him peace—in the authentic hadith narrated by Maysara, who said:
“I asked, ‘O Messenger of Allah, when were you a prophet?’—or, in another version, ‘When were you recorded as a prophet?’ He replied, ‘When Adam was between soul and body.’”
They therefore suppose that he himself and his prophethood came into existence at that time. This is ignorance, for Allah did not make him a prophet until he was forty years old. He said to him:
“Through Our revelation of this Quran to you, although before it you were among those unaware.”
And He said:
“And He found you lost and guided you.”
In the two Sahīhs it is related:
“When the angel came to him, he said, ‘Read!’ He replied, ‘I cannot read’—three times.”