Here we characterize the transcriptional and epigenetic landscape of self-reactive CD8+ T cells in a mouse model of protracted central nervous system (CNS) autoimmunity and compare it to populations of CNS-resident memory CD8+ T cells emerging from acute viral infection. This evidence concerns the gene CD8A and viral infectious disease.