Correction to: Nature Immunology https://doi.org/10.1038/s41590-023-01720-w, published online 18 January 2024.

In the version of the article initially published, in Fig. 3c, two instances of “CD8+ TEM cells” appeared as “CD8+ TCM cells”. This has been corrected in the HTML and PDF versions of the article.