Adaptive immune cells such as T cells are essential to combat infections. However, while the immune response to some infections is highly efficient with minimal damage to the host, it fails or causes substantial pathology in response to others. CD8+ T cells responding to chronic infections or tumours progressively lose their effector function and differentiate into a dysfunctional state called ‘T cell exhaustion’. T cell exhaustion is characteristic of tumour-infiltrating T cells in both humans and mice. Exhausted T cells are continuously replenished by T cells with precursor characteristics that self-renew and depend on the transcription factor TCF1; however, their developmental requirements are not well understood. Here, using transcriptional and epigenetic profiling of mouse infection models we demonstrate that high antigen load promoted the differentiation of precursor T cells, which acquired hallmarks of exhaustion within days of infection, whereas early effector cells retained polyfunctional features. Our data show that enhanced expression of exhaustion-associated molecules such as PD-1 and TOX, early after activation in situations of high antigen exposure, induces a brake on early precursor T cells, allowing their preservation during ongoing infections while reducing the risk of immune-mediated collateral damage. Such a mechanism is an evolutionarily useful adaptation that allows for the maintenance of T cell responses during protracted infections or tumour growth while protecting the organism from immune pathology. The mechanisms discovered for TPEX cell differentiation and maintenance in this study may potentially be useful for improving the current immunotherapy strategies.