Gene identified in worms controls how resources are allocated for stress resilience, longevity and fertility.