If you're using MirAI, I believe that if the AI detects that no healing is done, then it stops doing aid potion.
The AI checks the homunculus HP, uses Aid Potion and then it checks it a short time later. If the homunculus is taking enough damage that the HP does not increase after Aid Potion, then the AI assumes that there are no more pots, when in fact, the homunc is just taking damage really fast.
For example, your homunc is at 1000 hp. The AI decides 1000 is too low, so uses aid potion. The aid potion heals 800. Your pet is continuing to take damage, so by the next time the AI checks homunc hp, it's now at 950. Even though you've thrown a potion, the AI just thinks that the HP hasn't increased and that you're out of potions.
I hope that makes sense.