Worms can be difficult to eradicate ( ask anyone who has horses) mostly because the treatments only kill the adults that are present at the time of treatment but not the eggs they have already produced, on top of that there is the problem of the worms developing resistance to the medicine used.
Some capillaria have a direct life cycle, it means they produce eggs that can take up to 3 weeks to develop. So it may take repeated treatments to see a result