Abstract Unleashing cytotoxic CD8 + T cells for effective cancer treatment requires understanding T cell states across different tumor microenvironments. Here, we developed an algorithm to recover both shared and tumor type specific programs and used it to analyze a scRNA-seq compendium of 38,852 CD8 + T cells from 141 patients spanning nine different human cancers. We uncovered a pan-cancer T cell dysfunction program that was predictive of clinical responses to immunotherapy and highlighted CXCR6 as a pan-cancer marker of dysfunctional T cells. In mouse models, CXCR6 increased following checkpoint blockade and was repressed by TCF1. Its ligand, CXCL16, was expressed primarily by myeloid cells, and was co-regulated with antigen presentation genes. CXCR6 deletion decreased Tox, CX3CR1, and Bcl2 expression, predisposing dysfunctional PD-1 + Tim3 + CD8 + T cells to apoptosis, and compromising tumor growth control. Our approach discovered a TCF1:CXCR6-CXCL16 regulatory axis essential for effective anti-tumor immunity, revealing a new perspective on T cell dysfunction and new opportunities for modulating this cell state.