I eat lots of green veggies, fruit, chia seeds/flax I also exercise 5x a week, drink 4 glasses of water per day. 1/2 the time I have healthy poops and 1/2 the time I have pebbles + constipation. Why?

Fruits and veggies. Your diet will define the consistency of your stool. The fruits and veggies along with the chia and flax can alter the stool. Play detective and start to note which fruits and veggies etc you eat make it one way or the other.