How to deal with students asking very incremental questions? I'm a TA/grader for an online course in introductory programming. We have students ask us questions related to homework/labs/etc. on Piazza where we can have quick back-and-forth with questions and answers. 

However, some students ask questions that are either require very basic logic, or are one of the first parts of the course. Also, some students ask for what we think of their code after every little change. 

I (at least) try to ask them back questions that will lead them logically and to think critically about the material, and to come up with a solution themselves. However, this leads to not much success.

My question is how to best respond to students who ask us these questions.
You refer to a "quick back-and-forth" in your question. A danger with being too responsive is that it becomes easier for a student to ask the TA than it would be to reason it out on his own, look up material from earlier lectures or from the Internet, etc. It also encourages students to "check in" with the TA more often, e.g. about tiny changes to their code.

Perhaps limiting your responsiveness could help. For example, announce that you will visit Piazza at 4 PM every weekday and answer all the questions that have accrued since your last visit. Don't answer questions multiple times per day.

That way, students won't expect immediate "coaching" from the TA, and might be more motivated to work through small problems themselves.