CD8 T cells play an essential role in defense against viral and bacterial infections and in tumor immunity. Deciphering T cell loss of functionality is complicated by the conspicuous heterogeneity of CD8 T cell states described across experimental and clinical settings. By carrying out a unified analysis of over 300 assay for transposase-accessible chromatin sequencing (ATAC-seq) and RNA sequencing (RNA-seq) experiments from 12 studies of CD8 T cells in cancer and infection, we defined a shared differentiation trajectory toward dysfunction and its underlying transcriptional drivers and revealed a universal early bifurcation of functional and dysfunctional T cell states across models. Experimental dissection of acute and chronic viral infection using single-cell ATAC (scATAC)-seq and allele-specific single-cell RNA (scRNA)-seq identified state-specific drivers and captured the emergence of similar TCF1+ progenitor-like populations at an early branch point, at which functional and dysfunctional T cells diverge. Our atlas of CD8 T cell states will facilitate mechanistic studies of T cell immunity and translational efforts.