In ST 1.23.5, Thomas considers the question of whether foreknowledge of merits is the cause of predestination. 'Merit', it should be noted, is used in a broad sense by scholastics to indicate both congruous and condign merit. 'Condign merit', which is merit in the strict sense, is intrinsic merit; it is established by justice. Thus, if I merit something by condign merit, or adequate merit (as it is sometimes also called), it is unjust not to give me what I merit. 'Congruous merit', also called inadequate merit or quasi-merit, does not derive from justice. If I merit something congruously, all this means is that it is fitting, all things considered, for that something to be given to me. Thus, for instance, if a king decides that if I do x, he will give me y, and y is not strictly required for justice, then when I do x, I merit y congruously. It would not be unjust for the king to deny me y, but all things considered (including the king's decision) it is better for me to be rewarded y than not. When we are talking about predestination we are necessarily talking about something that can only be congruously merited. Thus, in this sense, the claim that God predestines because He foresees our faith is just a slightly more specific version of the claim Aquinas is considering; the doctrine of prescient election claims that by faith we congruously merit election. And, indeed, the first objectio that Aquinas considers is a clear affirmation of prescient election:
It seems that foreknowledge of merits is the cause of predestination. For the Apostle says (Romans 8:29): "Whom He foreknew, He also predestined." Again a gloss of Ambrose on Rm. 9:15: "I will have mercy upon whom I will have mercy" says: "I will give mercy to him who, I foresee, will turn to Me with his whole heart." Therefore it seems the foreknowledge of merits is the cause of predestination.
In answering the question, Aquinas first makes a distinction between two positions:
(1) Positions that take it to mean that the meriting action somehow forces God to choose, which Aquinas says that no one has been so insane (insanae mentis, of unhealthy mind) as to claim (alas, I don't think we could say the same);
and
(2) Positions that take it to mean that God has pre-ordained that He would elect to anyone who merited it in some way.
And he divides the positions in (2) according to the time of merit.
Some people hold that God predestines according to the merits of a former life (Aquinas attributes this to followers of Origen). In response he quotes Romans 9:11-12: For when they were not yet born, nor had done any good or evil . . . not of works, but of Him that calleth, it was said of her: The elder shall serve the younger.
Others hold that God predestines according to pre-existing merits in this life. By 'pre-existing' Aquinas means, 'occurring before the time when the effect of God's predestinative decree actually goes in to effect for that person'. This is the position that by doing some type of good works we can merit saving grace, and Aquinas associates this with the Pelagians: we begin the process, God completes it. Aquinas quotes 1 Corinthians 3:5 against this position: we are not sufficient to think anything of ourselves as of ourselves.
The third position Aquinas considers is the position that some effect of predestination is the reason for predestination (e.g., that God foresees that we will make good use of grace).
His argument against his third position actually applies against all three positions. He notes that the reason why someone might hold this view is to preserve free choice:
But these seem to have drawn a distinction between that which flows from grace, and that which flows from free will, as if the same thing cannot come from both. It is, however, manifest that what is of grace is the effect of predestination; and this cannot be considered as the reason of predestination, since it is contained in the notion of predestination. Therefore, if anything else in us be the reason of predestination, it will outside the effect of predestination. Now there is no distinction between what flows from free will, and what is of predestination; as there is not distinction between what flows from a secondary cause and from a first cause. For the providence of God produces effects through the operation of secondary causes, as was above shown (ST 1.22.3). Wherefore, that which flows from free-will is also of predestination.
In other words, Aquinas is arguing that these views make the mistake of thinking that free choice has to be somehow protected from predestination or it isn't free. But this is to make a mistake about how God causes things. They think that if God's causing an action by grace is inconsistent with our having free choice. But this is simply false; if this were true in general, God's providence would be riddled with wholes and failures. Therefore, says Aquinas,
It is impossible that the whole of the effect of predestination in general should have any cause as coming from us; because whatsoever is in man disposing him towards salvation, is all included under the effect of predestination; even the preparation for grace. For neither does this happen otherwise than by divine help, according to the prophet Jeremias (Lamentations 5:21): "convert us, O Lord, to Thee, and we shall be converted."
There is, of course, a sense in which faith or good use of grace or what have you is the reason for election; it is a final cause of it. That is, God gives grace in order that we might have faith, or use it well, or whatever else. But this is a very different sort of thing. The real cause of election, however, is nothing other than God's goodness, "towards which the whole effect of predestination is directed as to an end; and from which it proceeds, as from its first moving principle."
In this we can see what Aquinas's answer to the doctrine of prescient election will be: "The use of grace foreknown by God is not the cause of His conferring grace, except after the manner of a final cause."
I was reminded of Aquinas's argument in readnig Rebecca's post, because her response is at least close kin to Aquinas's. And this is perhaps not surprising; while they are not the same, Aquinas's basic doctrine of predestination and Calvinist doctrines of predestination are very similar in their basic principles, and they both agree completely at least in this: they are serious attempts to preserve the primacy or priority of God's creative power over any creaturely effect.