T cell development in the thymus involves V(D)J recombination generating diverse TCRs, followed by positive selection (retention of TCRs that weakly bind self-MHC) and negative selection (deletion of TCRs that strongly bind self-MHC-peptide). This ensures T cells recognize self-MHC but tolerate self-antigens, preventing autoimmunity.
From your study of adaptive immunity, you know that T cells are the immune system's most discriminating effectors — they recognize specific antigens presented on MHC molecules. But this raises a paradox: how does the body produce millions of T cells with randomly generated receptors and ensure that none of them attack the body's own tissues? The answer lies in a rigorous two-stage quality control process that takes place in the thymus, an organ above the heart where immature T cells (called thymocytes) are educated before being released into circulation.
The process begins when bone marrow progenitors migrate to the thymus and start rearranging their T cell receptor (TCR) genes through V(D)J recombination — the same combinatorial mechanism you learned about in adaptive immunity. This random gene shuffling generates an enormous diversity of TCRs, but most of the resulting receptors are useless or dangerous. The thymus exists precisely to weed them out. Only about 2–5% of thymocytes survive the selection process; the rest die by apoptosis and are quietly cleared away by thymic macrophages.
Positive selection is the first checkpoint, occurring in the thymic cortex. Cortical epithelial cells display self-MHC molecules loaded with self-peptides. A thymocyte whose TCR can bind self-MHC with at least moderate affinity receives a survival signal; those that cannot bind MHC at all are useless (they would never detect any antigen presentation) and die by neglect. This step ensures every surviving T cell is MHC-restricted — it can only "read" antigens in the context of the body's own MHC, which you studied as a prerequisite. Positive selection also determines lineage commitment: thymocytes that bind MHC class I become CD8+ cytotoxic T cells, while those binding MHC class II become CD4+ helper T cells.
Negative selection follows in the thymic medulla and is the critical tolerance checkpoint. Here, medullary epithelial cells and dendritic cells present a broad sampling of self-antigens — remarkably, a transcription factor called AIRE drives expression of tissue-specific proteins (like insulin or thyroglobulin) right there in the thymus. Any thymocyte whose TCR binds these self-MHC-peptide complexes too strongly is eliminated through apoptosis. The logic is straightforward: a T cell that reacts vigorously to self-antigens in the thymus would attack healthy tissue if released into the body. Some moderately self-reactive cells are not deleted but instead differentiated into regulatory T cells (Tregs), which actively suppress immune responses and provide an additional layer of tolerance in the periphery.
The net result is a repertoire of mature T cells that thread a precise needle: each one recognizes the body's own MHC molecules well enough to function (positive selection passed) but does not react strongly to self-antigens (negative selection passed). When this system fails — through defects in AIRE, incomplete negative selection, or peripheral tolerance breakdown — the consequence is autoimmune disease, where T cells attack the body's own tissues. Understanding thymic selection explains not only how adaptive immunity achieves self-tolerance but also why autoimmunity is an ever-present risk that the immune system must actively manage.