In mammals, crosstalk between O2 and CO2 sensing central and peripheral chemoreceptors has been linked to functions of the hematopoietic system. Here, the authors show an evolutionarily relevant cascade involving multiple organs that links CO2- and O2-chemosensation to immune cell maturation in Drosophila.