T-cell receptor (TCR) signalling has a key role in determining T-cell fate. Precursor cells expressing TCRs within a certain low-affinity range for complexes of self-peptide and major histocompatibility complex (MHC) undergo positive selection and differentiate into naive T cells expressing a highly diverse self-MHC-restricted TCR repertoire. In contrast, precursors displaying TCRs with a high affinity for 'self' are either eliminated through TCR-agonist-induced apoptosis (negative selection) or restrained by regulatory T (Treg) cells, whose differentiation and function are controlled by the X-chromosome-encoded transcription factor Foxp3 (reviewed in ref. 2). Foxp3 is expressed in a fraction of self-reactive T cells that escape negative selection in response to agonist-driven TCR signals combined with interleukin 2 (IL-2) receptor signalling. In addition to Treg cells, TCR-agonist-driven selection results in the generation of several other specialized T-cell lineages such as natural killer T cells and innate mucosal-associated invariant T cells. Although the latter exhibit a restricted TCR repertoire, Treg cells display a highly diverse collection of TCRs. Here we explore in mice whether a specialized mechanism enables agonist-driven selection of Treg cells with a diverse TCR repertoire, and the importance this holds for self-tolerance. We show that the intronic Foxp3 enhancer conserved noncoding sequence 3 (CNS3) acts as an epigenetic switch that confers a poised state to the Foxp3 promoter in precursor cells to make Treg cell lineage commitment responsive to a broad range of TCR stimuli, particularly to suboptimal ones. CNS3-dependent expansion of the TCR repertoire enables Treg cells to control self-reactive T cells effectively, especially when thymic negative selection is genetically impaired. Our findings highlight the complementary roles of these two main mechanisms of self-tolerance.