Here, imaging mass cytometry of tumor tissues from ICB-treated patients identifies a distinct cell population of CD39+PD-1+CD8+ T cells, specifically the TCF1+ subset, precursor exhausted T (CD39+ Tpex) cells, which positively correlate with ICB benefit. Here, CD8A is linked to neoplasm.