To maximize fitness upon pathogenic infection, host organisms might reallocate energy and resources among life-history traits, such as reproduction and defense. The fitness costs of infection can result from both immune upregulation and direct pathogen exploitation. The extent to which these costs, separately and together, vary by host genotype and across generations is unknown. We attempted to disentangle these costs by transiently exposing wild isolates and a lab-domesticated strain of Caenorhabditis elegans nematodes to the pathogen Staphylococcus aureus, using exposure to heat-killed pathogens to distinguish costs due to immune upregulation and pathogen exploitation. We found that host nematodes exhibit a short-term delay in offspring production when exposed to live and heat-killed pathogen, but their lifetime fecundity (total offspring produced) recovered to control levels. We also found genetic variation between host isolates for both cumulative offspring production and magnitude of fitness costs. We further investigated whether there were maternal pathogen exposure costs (or benefits) to offspring and revealed a positive correlation between the magnitude of the pathogen-induced delay in the parent's first day of reproduction and the cost to offspring population growth. Our findings highlight the capacity for hosts to recover fecundity after transient exposure to a pathogen