We show that the development of abstract reasoning and cognitive empathy (theory of mind) is severely hindered when children are deprived of the stimulation of a school environment. We document significantly lower abstract reasoning and cognitive empathy scores in elementary school children who returned from an extended school closure caused by the Covid-19 pandemic relative to proximate pre-pandemic cohorts. This developmental delay has a significant socioeconomic gradient, with underprivileged children experiencing more substantial delays. We also document a significant disruption in the development of socioemotional skills: 0.24 sd lower grit, 0.43 sd lower emotional empathy, 0.06 sd lower epistemic curiosity, and 0.24 sd higher impulsivity. About eight months of school exposure results in a remarkable recovery in abstract reasoning and theory of mind for all socioeconomic groups. However, the measured levels still indicate significant delays relative to the expected developmental trajectories. No notable improvements are observed in socioemotional skills except for curiosity. These findings reveal that the damage school closures inflicted on children goes beyond well-documented academic losses and highlight the crucial role of the school environment in fostering fundamental cognition and socioemotional development in children.