Robert Jenson (an essay in Divine Impassibility and the Mystery of Human Suffering ) notes that Thomas teaches that Gods foreseeing determines what is seen, and specifically determines what is seen with respect to their ordering to their good, which is Himself. He briefly notes the problems this raises for theodicy, which he regards as in this life insoluble: faith in Gods universal ordering of creation to the good . . . will remain a great Nevertheless . . . until the final vision. But hes more interest in prayer: What role do our prayers have if Gods foreseeing is already determinative?
Jenson employs a musical analogy, borrowing from Jeremy Begbie: a western compositions total plot of tensions and resolutions has a bottom temporal level of meter-bars, and as many superimposed levels of ever more encompassing hyperbars phrases, themes, movements, etc. as the musics sophistication requires. What time it is in a piece of music thus depends on which level of bars or hyperbars you are asking about.
Back to prayer, then:
If God already foresees what were to do, and if he thus already knows what he ordained and ordains what he knows, to what purpose is prayer? The problem is the assumption that God has already foreseen, for that presupposes that Gods history with us can indeed be laid out on a straight time-line, on a sequence of meter-bars without hyperbars, without phrasing or melody or development or . . . ; that is, it presupposes that already and before and their like are univocal when used of Gods time with us. But what . . . if the temporal relation between Gods determination and my prayer is not exhausted in any one before-and-after? What if there is a section through the bar-and-hyperbar structure of Gods time with us, in which his determination precedes my prayer, and one in which my prayer precedes his determination?
On this account, we can address the Father in confidence that he responds to us, like a good parent: We address the Father, after all, in unison with the One who by birth has that right, and who is himself one of the eternal Trinity whose joint knowledge and decision determine the event. Prayer is involvement in Providence.