Abstract. The trade-off between current and future reproduction has led many organisms experiencing stochastic reproductive opportunities to be flexible in their resource acquisition and allocation rules. Many parasitoid wasps display flexibility in choosing to host-feed or oviposit on a host and possess an ovarian system enabling nutrient reallocation through egg resorption.The aim of this work is to assess the complementary adaptive values of host-feeding and egg resorption as functions of host density in a synovigenic (maturing eggs throughout its adult life) parasitoid, Eupelmus vuilleti (Hymenoptera: Eupelmidae), for which there is a uniquely large base of relevant knowledge. We developed a series of models of increasing complexity, starting from a simple analytical model without egg resorption and moving on to data-rich stochastic dynamic programming models (SDP), without and with resorption.The analytical model enabled the characterization of two, long-and short-term, foraging strategies which determine host usage. Oviposition is favored at low host densities (leading to the short-term strategy), while host-feeding is favored at high host densities (leading to the long-term strategy). The change of strategy occurs abruptly at intermediate host densities. The SPD models not only confirmed these predictions, but also identified smaller regions of decisions driven by day/night cycles and approaching death and predicted major shifts in daily activity patterns according to the chosen strategy. The fitness gain due to resorption is highest at intermediate host densities, where females adopt the riskier but more profitable long-term strategy. Such a result contrasts with the generally held view, which assumes highest gains at the lowest host densities. A counterintuitive result is the higher prevalence of host-feeding associated with the ability to resorb eggs.Considering egg resorption as a last-resort strategy is underestimating its adaptive value, which is best understood with reference to other sources of nutrients. Its deterministic and controllable nature acts as insurance to forage and oviposit at low host densities, despite irregular food availability and potential death through starvation. Thus timing, not so much overall energy gain, matters in egg resorption. The approach can be extended to other situations, and we highlight an unexpected analogy of our results with the hoarding behavior of vertebrates.