In pig breeding, environmental challenges can affect the welfare and productivity of animals. Resilient animals have the capacity to be minimally affected by these environmental challenges. Understanding the genetic basis of sensitivity to these environmental challenges is crucial for selecting more resilient animals, thereby enhancing welfare and productivity. The aims of this study were to: (1) estimate the probability of the occurrence of an unrecorded environmental challenge at a given day using daily feed intake (DFI) data, and (2) evaluate the genetic determinism of environmental sensitivity in three pig lines bred in real selection conditions. Data comprised of 100,799, 186,247, and 304,826 DFI records from 1,618, 2,517, and 3,788 Landrace (LA), Large White (LW) and Piétrain (PI) male pigs, respectively. The pedigree included 3,730, 5,649, and 9,293 animals for LA, LW, and PI, respectively. The probabilities of the occurrence of an unrecorded environmental challenge at a given day were estimated via a mixture model. The probabilities (p) of being "high CV days" were then taken as reference and used in genetic analysis as an environmental descriptor to describe the environment. DFI records were analysed using two linear models: a linear reaction norm animal model (RNAM) and the animal model. (Co)variance components were estimated using average-information restricted maximum likelihood (AI-REML). The means of the probabilities of the occurrence of an environmental challenge for LA, LW, and PI were 0.24, 0.10, and 0.22, respectively, indicating that the probability of an environmental challenge was low for most of the days. The genetic correlations between the intercept and the slope obtained from the RNAM for LA, LW, PI were -0.52, 0.06, and -0.36, respectively. These findings suggest that selecting hypothetically for decreased DFI in non-stressful conditions would result in pigs with increased DFI in stressful conditions in the LA and PI lines, whereas it would have a minor impact on the environmental sensitivity of LW. The proportion of resilient animals for LA, LW, and PI was 75.0, 74.2, and 72.2%, respectively, implying that most of the animals were resilient. The study demonstrated that the slope of DFI is heritable and can effectively be used as an indicator of sensitivity to environmental challenges. These results are valuable in improving the resilience of livestock species to environmental challenges through genetic selection.