Despite their importance for determining the evolution of the Earth's atmosphere and surface conditions, the evolutionary histories of the Earth's atmospheric CO2 abundance during the Archean eon and the Sun's activity are poorly constrained. In this study, we apply a state-of-the-art physical model for the upper atmosphere of the Archean Earth to study the effects of different atmospheric CO2/N2 mixing ratios and solar activity levels on the escape of the atmosphere to space. We find that unless CO2 was a major constituent of the atmosphere during the Archean eon, enhanced heating of the thermosphere by the Sun's strong X-ray and ultraviolet radiation would have caused rapid escape to space. We derive lower limits on the atmospheric CO2 abundance of approximately 40% at 3.8 billion years ago, which is likely enough to counteract the faint young Sun and keep the Earth from being completely frozen. Furthermore, our results indicate that the Sun was most likely born as a slow to moderate rotating young G-star to prevent rapid escape, putting essential constraints on the Sun's activity evolution throughout the solar system's history. In case that there were yet unknown cooling mechanisms present in the Archean atmosphere, this could reduce our CO2 stability limits, and it would allow a more active Sun.