Correction to: Nature https://doi.org/10.1038/s41586-019-1244-x, published online 29 May 2019.

In this Letter, all occurrences of ‘CD45RA’ should have been ‘CD45R’. The main text, Methods section, Extended Data Figs. 3 and 5, Extended Data Table 1 and the Reporting Summary of the original Letter have all been updated online accordingly.