Using freshly resected lung tissue, from individuals with active or previous TB, we identified distinct CD4+ and CD8+ Trm-like clusters within TB-diseased lung tissue that were functional and enriched for IL-17–producing cells. Here, CD4 is linked to tuberculosis.