You should continue cotrimoxazole prophylaxis as long as the HIV-infected child is alive. You can discontinue cotrimoxazole in the following conditions:
- Once HIV infection has been ruled out by serology at or after 18 months of age.
- If the child develops skin lesions all over their body or has severe palmar pallor, you should stop cotrimoxazole and refer the child urgently.