There is increasing awareness that combinations of biotic and time stress interact in shaping life history plasticity. Despite being widespread and abundant, the role of cannibalism in linking both types of constraints to life history plasticity has been largely neglected. Moreover, no studies disentangled direct (due to the extra meal) and indirect (due to the elimination of the competitor) life history effects of cannibalism, and little is known about their differential dependency on these constraints. We studied effects of cannibalism on the life history of the damselfly Lestes viridis under combinations of time stress (by manipulating the perceived time available in the growth season) and food stress. We reared larvae per two and disentangled direct and indirect effects of cannibalism by preventing cannibalism in half of the cups and by manipulating the per capita food increase after cannibalism. Cannibalism was more frequent under both time stress and food stress and our results show it may help cannibals to compensate for the negative effects of these constraints imposed on life history. Both direct and indirect benefits of cannibalism (increased development and growth rates, larger mass at emergence) were dependent on the timing of cannibalism, being more pronounced or only present when cannibalism occurred early. Moreover, we found that the ecological constraints (time stress and food stress) also differentially shaped some of the direct and indirect effects. Given the differential context-dependency of direct and indirect effects and the fact that direct and indirect life history effects may be both important in shaping life history, disentangling these effects is critical to mechanistically understand under which conditions cannibalism is expected to be adaptive or not.