Here we reveal that epigenetic characteristics of baseline CD8+ T cells can be used to identify metastatic GC patients who may benefit from anti-PD-1 therapy. This evidence concerns the gene PDCD1 and gastric cancer.