CD8+ tissue-resident memory T-cell development depends on infection-matching regulatory T-cell types. Here, CD8A is linked to infection.