usually if they have an internal parasite the poop goes white and/or clear. The fact that it isn't is good. It also indicates he is still eating. Maybe you should try giving him something interesting to eat, brine shrimp or blood worms. It may be that he is lacking an essential vitamin and he may be able to get it in a new type of food.
I would keep a close eye though, it is definitely concerning that he is thinning. Sometimes the only way to diagnose is if you see a secondary symptom. I hope he is ok.
Oh, another sign of parasites is listlessness and spitting out his food.