Background: Human-caused climate change is already increasing the intensity and frequency of extreme weather events, such as droughts. The health and economic consequences of these events are expected to be particularly severe for populations in low-income settings whose livelihoods rely on rain-fed agriculture. Within these populations, children are an especially vulnerable group, as undernutrition is linked to 45% of all child deaths across the globe. Despite progress, adaptation gaps exist. We still lack strong evidence on policies to effectively mitigate climate change's most severe consequences for children. In this paper we ask whether adaptation investments in the form of improved community healthcare can build climate resilience in a low-income country setting. Methods: We reanalyzed data from a clustered randomized controlled trial inducing spatial variation across 214 Ugandan villages in community-health program strengthening, and combined it with quasi-experimental data on locality-specific rainfall shocks. In the intervention clusters, financially incentivized community health workers (CHWs) were deployed over a three-year period to conduct home visits and provide integrated community case management and maternal, newborn, and child health treatment and preventive services. The trial followed 7,018 households with young children (3,790 in 115 intervention clusters and 3,228 in 99 control clusters) over three years. We estimated the effect of low rainfall in the growing season on infant mortality in the following (post-harvest and lean) period, conditional on CHW deployment, over six season-pairs in 2011-2013. Findings: There were 134 infant deaths in the intervention clusters (38.6 deaths per 1000 infant-years) over the three-year trial period. 60 deaths (40.7 deaths per 1000 infant-years) occurred in periods following growing seasons with rainfall below the long-run detrended mean (rainfall deficit seasons), and 74 deaths (36.8 deaths per 1000 infant-years) occurred in periods following growing seasons rainfall above the long-run detrended mean (rainfall surplus seasons). There were 160 infant deaths in the comparison clusters (61.3 deaths per 1000 infant-years). 83 deaths (81.5 deaths per 1000 infant-years) occurred in periods following rainfall deficit seasons, and 77 deaths (46.3 deaths per 1000 infant-years) occurred in periods following rainfall surplus seasons. Adjusting only for the stratified random assignment of clusters, the mean difference corresponded to a 46% reduction in under-five mortality rate (p=.000; adjusted rate ratio 0.54, 95% CI 0.39-0.73) following rainfall deficit seasons. The risk of infant deaths in the comparison relative to the intervention group increased in the magnitude of the rainfall deficit. Interpretation: Adaptation investments in a low-income context - here in the form of improved access to community health care - reduced the risk of infant mortality following adverse weather events.