T-cell precursors enter the thymus from the bone marrow without knowing what they will recognize. Their fate is decided by how their newly rearranged T-cell receptor (TCR) interacts with self major histocompatibility complex (MHC) molecules presenting self peptides on thymic cells.
In cortical positive selection, thymocytes whose TCR binds self MHC with low affinity receive a survival signal and are rescued from death by neglect. A thymocyte that cannot engage self MHC at all dies, because a TCR that never sees peptide-MHC in the thymus would never see it in the periphery either. This step therefore restricts the repertoire to MHC-restricted cells and simultaneously commits the cell to the CD4 or CD8 lineage depending on whether MHC class II or class I was engaged.
In medullary negative selection, thymocytes that bind self peptide-MHC too strongly are deleted by apoptosis. Cells that escape deletion are not simply released; many become natural regulatory T cells (Tregs), which suppress self-reactive lymphocytes in the periphery. The affinity of TCR engagement thus sets three outcomes: too weak leads to death by neglect, intermediate leads to survival as a conventional T cell, and too strong leads to deletion or Treg conversion.
A block at the positive-selection stage produces severe T-cell deficiency, because few or no thymocytes are rescued. A failure of negative selection or Treg generation does not reduce T-cell numbers; it releases self-reactive cells and is a route to autoimmunity rather than to immunodeficiency.