From Origen’s On Prayer:
If our free will is in truth preserved with innumerable inclinations towards virtue or vice, towards either duty or its opposite, its future must like other things have been known by God, before coming to pass, from the world’s creation and foundation; and in all things prearranged by God in accordance with what He has seen of each act of our free wills. He has with due regard to each movement of our free wills prearranged what also is at once to occur in His providence and to take place according to the train of future events. God’s foreknowledge is not the cause of all future events including those that are to have their efficient cause in our freewill guided by impulse.
Even though we should suppose God ignorant of the future, we shall not on that account be incapacitated for effecting this and willing that. Rather it ensues from His foreknowledge that our individual free wills receive adjustment to suit the universal arrangement needful for the constitution of the world. If, therefore, our individual free wills have been known by Him, and if in His providence He has on that account been careful to make due arrangement for each one, it is reasonable to believe that He has also pre-comprehended what a particular man is to pray in that faith, what his disposition, and what his desire.
…
Should the fact of God’s unerring foreknowledge of the future disquiet anyone by suggesting that things have been necessarily determined, we must tell him that it is a real part of God’s fixed knowledge that a particular man will not with any fixed certainty choose the better or so desire the worse as to become incapable of a change for his good. And again I will do this for this man when he prays, as becomes me seeing that he will pray without reproach and will not be negligent in prayer: upon that man who will pray for a certain amount, I will bestow this abundantly in excess of his asking or thinking, for it becomes me to surpass him in well doing and to furnish more than he has been capable of asking.
…
…This foreknowledge, it may be in regard to all things, certainly in regard to Judas and other mysteries, exists in the Son of God also, who in His discernment of the evolution of the future has seen Judas and the sins to be committed by him, so that, even before Judas came into existence, He in His comprehension has said through David the words beginning “O God, keep you not silence at my praise.”