N.W.
My female cat did that for awhile. She was diagnosed with irritable bowel syndome. She was on a course of meds plus probiotics for a few weeks and now eats prescription cat food. Plus I changed the type of litter in her box to all natural pine pellets. Of all those things, I'm not sure which one helped her or if it was a combination of all but she now poops in her litter box again.