The presence of multiple planets in mean motion resonances has often been interpreted as an indicator that convergent, disk driven migration occurred in observed exoplanetary systems. Resonant chains like those within the systems of Kepler-223 and Kepler-80 consist of at least a trio of planets with the three-body resonant angle librating and/or with a two-body resonant angle librating for each pair. Here we investigate whether close-in super-Earths and mini-Neptunes forming in situ can lock into resonant chains due to dissipation from a depleted gas disk. We simulate the giant impact phase of planet formation, including eccentricity damping from a gaseous disk, followed by subsequent evolution over tens of millions of years. In a fraction of simulated systems, we find that planets naturally lock into resonant chains. They achieve a chain of near-integer period ratios during the gas disk stage, experience eccentricity damping that captures them into resonance, stay in resonance as the gas disk dissipates, and subsequently avoid giant impacts, eccentricity excitation, and chaotic diffusion that could disrupt the resonant chains. Disk conditions that enable planets to complete their formation during the gas disk stage enable those planets to achieve tight period ratios and, if they happen to be near integer period ratios, lock into resonance. Using the weighting of different disk conditions deduced by MacDonald et al. (2020) and forward modeling Kepler selection effects, we find that our simulations of in situ formation via oligarchic growth produce a proportion of resonant planetary trios comparable to those in observed Kepler systems of super-Earths and mini-Neptunes.