BACKGROUND: CD8+ tumor-infiltrating lymphocytes (TILs) comprise phenotypically and functionally heterogeneous subpopulations. Of these, effector memory CD45RA re-expressing CD8+ T cells (Temra) have been discovered and characterized as the most terminally differentiated subset. However, their exact ontogeny and physiological importance in association with tumor progression remain poorly understood. METHODS: We analyzed primary tumors and peripheral blood samples from 26 patients with non-small cell lung cancer and analyzed their phenotypes and functional characteristics using flow cytometry, RNA-sequencing, and bioinformatics. RESULTS: We found that tumor-infiltrating Temra (tilTemra) cells largely differ from peripheral blood Temra (pTemra), with distinct transcriptomes and functional properties. Notably, although majority of the pTemra was CD27-CD28- double-negative (DN), a large fraction of tilTemra population was CD27+CD28+ double-positive (DP), a characteristic of early-stage, less differentiated effector cells. Trajectory analysis revealed that CD8+ TILs undergo a divergent sequence of events for differentiation into either DP or DN tilTemra. Such a differentiation toward DP tilTemra relied on persistent expression of CD27 and CD28 and was associated with weak T cell receptor engagement. Thus, a higher proportion of DP Temra was correlated with lower immunogenicity of tumor antigens and consequently lower accumulation of CD8+ TILs. CONCLUSIONS: These data suggest a complex interplay between CD8+ T cells and tumors and define DP Temra as a unique subset of tumor-specific CD8+ TILs that are produced in patients with relatively low immunogenic cancer types, predicting immunogenicity of tumor antigens and CD8+ TIL counts, a reliable biomarker for successful cancer immunotherapy.