Correction to: Nature Medicine https://doi.org/10.1038/s41591-023-02347-y, published online 15 May 2023.

In the version of the article initially published, in the “TME-high” row in Extended Data Fig. 6a, the images for “CD3” and “CD8” were identical. Extended Data Fig. 6a has now been amended with the correct image for “CD8” in the HTML and PDF versions of the article.