CD8+ T cell trajectory subtypes decode tumor heterogeneity and provide treatment recommendations for hepatocellular carcinoma. Here, CD8A is linked to hepatocellular carcinoma.