Statistical assessment of patients with acute myeloid leukemia (AML) and myelodysplastic syndromes (MDS) treated with ICIs revealed enrichment of IFNγ+ IL-17- CD8+ T and CXCR3+ CCR6+ Th17/Th1 cells in BALF in the group developing pneumonia. This evidence concerns the gene CD8A and susceptibility to pneumonia measurement.