During persistent antigen stimulation, exhausted CD8+ T cells are continuously replenished by self-renewing stem-like T cells. However, how CD8+ T cells adapt to chronic stimulation remains unclear. Here, we show that persistent antigen stimulation primes chromatin for regulation by the redox-sensing KEAP1-NRF2 pathway. Loss of KEAP1 in T cells impaired control of chronic viral infection. T cell-intrinsic KEAP1 suppressed NRF2 to promote expansion and persistence of virus-specific CD8+ T cells, drive a stem-like T cell response, down-regulate immune checkpoint molecules, and limit T cell receptor (TCR) hyperactivation and apoptosis. NRF2 epigenetically derepressed BACH2 targets and opposed a stem-like program driven by BACH2. In exhausted T cells induced by tonic GD2 chimeric antigen receptor (CAR) signaling, the effects of KEAP1 deficiency were rescued by inhibiting proximal TCR signaling. Enhancing mitochondrial oxidation improved the expansion and survival of KEAP1-deficient CD8+ GD2 CAR T cells and up-regulated markers associated with stem-like cells. Thus, the KEAP1-NRF2 axis regulates stem-like CD8+ T cells and long-term T cell immunity during chronic antigen exposure.