Beginning centuries ago the church has had cause to address many issues, often at council, some of them very controversial, some more mundane. The councils were more or less modeled on the meeting at Jerusalem which took place around 50 AD, attended by Paul, Barnabas, Peter, and other disciples who addressed the issue of legalism and expectations for Gentile believers, generally considered to be the first council. Later at council the church would assemble the canon of Scripture, decide on the deity of Christ and the relationship between His human and divine natures, and, related to that, the Trinity. At one point Pelagianism became popularized, the idea that a person could make themselves right in the eyes of God by their own efforts. Semi-Pelagianism modified that view, claiming that man comes to faith on his own, apart from grace, but from then on God grants the grace necessary for salvation. Augustine argued against both of these views and later on, at a small local council in 529 at Orange (Aurenja), now part of France, a council whose decisions were later approved and sanctioned by the church, his arguments mainly were employed to officially lay down the Church’s doctrine on grace for the purpose of ending the controversy.
At that council, using 25 canons, the church insisted on the absolute necessity of grace in order to turn man to God in faith, in order for man to do anything good, in order for man to be pulled from the pit. But it goes on to say that, once a person is so graced, responding to God in faith, they now “have the ability and responsibility, if they desire to labor faithfully, to perform with the aid and cooperation of Christ what is of essential importance in regard to the salvation of their soul”.
This is the Catholic position today, that we cannot possibly be saved without God (we wouldn’t even know where to begin), and yet that He doesn’t finally save us without us, so to speak. He wants our wills involved, for our own greatest good. So He justifies us IOW, and then we remain and walk and persevere and grow in that justice, that righteousness, that love, that image of Himself, or not. We must remain in Him and that life of grace, daily picking up our cross and doing His will as best we can with that grace, with Him.