Correction to: Nature https://doi.org/10.1038/s41586-021-03752-4 Published online 21 July 2021

In the originally published version of this Article there were three labeling errors in Fig. 1. The cluster names for “CD8-MHCII” and “CD8-proliferating” were switched and the cluster names for “Stem-like memory” and “MAIT” were switched (Fig. 1c). Their positions have now been corrected. In Fig. 1d, a typo in the “SCL4A10” gene label has been corrected to “SLC4A10.” The legend for Fig. 1c originally referred to the heatmap as displaying the “top-5” most differential genes. This has been corrected to “the top-3” most differential genes. In the eighth paragraph of main text, a typo in the gene name “LINC02246” has been corrected to “LINC02446.” Further, in Supplementary Table 9, the data point “5” was missing in the Number of nonsynonymous mutations per exome column for patient NY016-007; this has now been corrected. The original Article has been corrected online.