The tumor microenvironment shapes the molecular characteristics of exhausted CD8+ T cells.