We study how confinement transforms the chaotic dynamics of bulk microtubule-based active nematics into regular spatiotemporal patterns. For weak confinements in disks, multiple continuously nucleating and annihilating topological defects self-organize into persistent circular flows of either handedness. Increasing confinement strength leads to the emergence of distinct dynamics, in which the slow periodic nucleation of topological defects at the boundary is superimposed onto a fast procession of a pair of defects. A defect pair migrates toward the confinement core over multiple rotation cycles, while the associated nematic director field evolves from a distinct double spiral toward a nearly circularly symmetric configuration. The collapse of the defect orbits is punctuated by another boundary-localized nucleation event, that sets up long-term doubly periodic dynamics. Comparing experimental data to a theoretical model of an active nematic reveals that theory captures the fast procession of a pair of [Formula: see text] defects, but not the slow spiral transformation nor the periodic nucleation of defect pairs. Theory also fails to predict the emergence of circular flows in the weak confinement regime. The developed confinement methods are generalized to more complex geometries, providing a robust microfluidic platform for rationally engineering 2D autonomous flows.