Correction to: Nature Immunology https://doi.org/10.1038/s41590-024-01897-8. Published online 12 July 2024.

In the version of this article initially published, the name of Chuangqi Wang was misspelled (“Chuanqi”); in Fig. 2a, data were missing in the lower-right plot and in Fig. 2f, the labels, now reading “LTBI” and “RSTR” in top-down fashion, were reversed. The changes have been made in the HTML and PDF versions of the article.