Walking by faith is not "works".
"Works" is "a righteousness of my own"; walking in faith is God's righteousness (Ro 1:17; 14:5,23).
"I was abundant in labors above them all, yet, not I, but the grace with me."
"I have been crucified with Christ. It is no longer I who live, but Christ who lives in me."
"[Christ] came and preached peace to you who were far away and peace to those who were near."
Because walking in faith is not "a righteousness of my own", but God's, justification thereby is "grace not works".
When the Galatians believed a false Gospel of works, what was Paul's solution?
Was it "believe in Christ alone"? No.
Instead, he instructs them to serve one another by faith working through love.
What's the difference between being under Law and serving others by faith?
Doesn't the Law tell you to love your neighbor?
The Law directs attention to self, to condemn sinfulness.
Looking to the Law/self is turning from Christ; looking to Christ is turning from the Law/self.
"For through the law I died to the law so that I might live to God."
"You who are trying to be justified by the law have been severed from Christ..."
Whose righteousness it is depends on who you behold--self or Christ.
Thus, to serve others by faith Christ authors differs from Law.
Paul had Timothy circumcised, yet he was not an accursed false teacher.
Why? Because Paul did it "because of the Jews in the region".
Paul was serving the Jews, trying to open a door so they might be saved.
Paul's circumcising Timothy proceeded from Christ for the Jews' salvation.
It wasn't because Paul sought justification by Law.
Thus, what makes something a "work", one's own righteousness, is who performs it.
When we walk by faith, that is God performing the righteousness.
"Yet not I but the grace with me."
If we do works, even good ones, without faith, we are condemned (Ro 14:5,23).
Faith is looking to Christ, not self.
God's righteousness, not our works.
"Not I but Christ."
Therefore, to say we're justified by walking in faith is "grace not works".
It's not us.
James taught so.
Paul calls marriage or celibacy "each man's gift".
So, man's walking in either of these is his "gift" given by grace--not his "work".
Walking in faith is "the gift of righteousness"--not our works, but God's.
Thus, Ro 2 can say "doers of the Law will be justified" without contradicting "grace not works".
The examples of doers it gives are Gentile believers who walk in God's righteousness by faith.
Walking by faith is not a righteousness of one's own, but God's.
Some claim "works" refers to Jewish practices like circumcision.
"We're not justified by becoming Jews," is their conclusion.
That doesn't work: Ro 3 "by works of Law comes the knowledge of sin".
Ro 7:7 says the fact that coveting is sinful is known by the Law.
So, "works of Law" encompasses the entirety of the Law's commands.
Then how can we be justified by being doers of the Law?
Because the works that justify come from God, as a gift, not self.
That's the difference--God's righteousness or man's righteousness.
So, yes, actually, we are justified, as James says, by walking in faith--and it's not a contradiction of "grace not works".
Paul uses "works" technically.
It seems James is correcting people who've misunderstood Paul.
It seems James uses "works" in a less technical way.