This gets into the thinking and workings of the Trinity, which in itself is difficult to comprehend. However, it would seem to me there is a greater argument that the Son understood what the Father wished for Him to do and was submissive in carrying out the Father's will. I would go back to the Nicene Creed which states the Son proceeded from the Father. This, to me would indicate that all things, including God's will, generates from the Father down. I would also point to Isaiah 53:10 that it "pleased the LORD to bruise him" which seems to be at odds with Anselm's conclusion that this idea was generated from the Son.
I question whether the Son (and the Holy Spirit) would have to "agree" with the Father which sounds like some sort of council. I would say they are always in agreement which is the will of the Father. Their very nature, that of being God, understands the will of God the Father. Therefore, the will of God the Father was always to have His Son die, and the Son, understanding this will, was submissive unto death.
Therefore, the will of God the Father was always to have His Son die
and in another post
The will of the Father and the Son was one of the same.
For one thing, Christ does distinguish between His will and the Father's: "not as I will, but as thou wilt" (Matthew 26:39).
The issue is whether the Father wanted Christ to die or whether the Father wanted our salvation and Christ the Man willed to die to make it happen. The central part of the discourse is where St. Anselm gives us the analogy of the crossing of the river, and of eating following church attendance. In the crossing of the river, he says, the will is to cross it and the boat is the fitting way to do it. There might be other ways, for example, on horseback, that for whatever reason are not fitting (perhaps, there is too much baggage, the person doing the crossing is not strong enough to ride, etc.) By choosing to wait for the boat the traveler does not wish the boat, he wishes to cross and the boat is a fitting means. In another example, when we delay the meal till after mass we cannot call the mass a means to have a dinner.
With these distinctions in mind, St. Anselm is able to conclude
Christ, therefore, came not to do his own will, but that of the Father; for his holy will was not derived from his humanity, but from his divinity. For that sentence: "God spared not his own Son, but gave him up for us all," means nothing more than that he did not rescue him. For there are found in the Bible many things like this. Again, when he says: "Father, if it be possible, let this cup pass from me; nevertheless not as I will, but as you will ;" and "If this cup may not pass from me, except I drink it, your will be done;" he signifies by his own will the natural desire of safety, in accordance with which human nature shrank from the anguish of death. But he speaks of the will of the Father, not because the Father preferred the death of the Son to his life; but because the Father was not willing to rescue the human race, unless man were to do even as great a thing as was signified in the death of Christ. Since reason did not demand of another what he could not do, therefore, the Son says that he desires his own death. For he preferred to suffer, rather than that the human race should be lost; as if he were to say to the Father: "Since you do not desire the reconciliation of the world to take place in any other way, in this respect, I see that you desirest my death; let your will, therefore, be done, that is, let my death take place, so that the world may be reconciled to you." For we often say that one desires a thing, because he does not choose something else, the choice of which would preclude the existence of that which he is said to desire; for instance, when we say that he who does not choose to close the window through which the draft is admitted which puts out the light, wishes the light to be extinguished. So the Father desired the death of the Son, because he was not willing that the world should be saved in any other way, except by man's doing so great a thing as that which I have mentioned. And this, since none other could accomplish it, availed as much with the Son, who so earnestly desired the salvation of man, as if the Father had commanded him to die; and, therefore, "as the Father gave him commandment, so he did, and the cup which the Father gave to him he drank, being obedient even unto death."