Through molecular espionage, a particular receptor (known as AhR) allows its host's immune response to stay one step ahead of infection; it achieves this by listening in on the inter-cellular transmissions that bacterial pathogens use to collectively coordinate an invasion. The results - shown in human cells, zebrafish and mice - uncover how this counterintelligence operation allows the host to fine-tune physiologically costly immune defenses against Pseudomonas aeruginosa infection, a highly common bacterial pathogen. The findings could pave the way toward new antimicrobial substances tailored to specific pathogens. P. aeruginosa is an omnipresent, exceptionally resilient and highly opportunistic bacterium that causes infectious diseases in a wide variety of plants and animals. In humans, it is responsible for a spectrum of illnesses, including several hospital-acquired infections that can have serious - and sometimes fatal - outcomes, particularly in those with compromised immune systems. However, what makes P. aeruginosa infections so uniquely difficult to treat is the bacterium's profound antibiotic resistance. Many pathogens use "quorum sensing" (QS), a small molecule cell-to-cell communication mechanism that allows the bacteria to rapidly adapt to changing conditions and coordinate their behavior throughout an infection. While the host sensor AhR is known to recognize QS molecules, their role in monitoring and responding to infection dynamics is poorly understood. Using both in vitro and in vivo models, Pedro Moura-Alves and colleagues demonstrate that P. aeruginosa quorum, expressed during infection, bind to the AhR and distinctly modulates its activity depending on the relative abundance of different QS molecules. According to Moura-Alves et al., this enables the host to sense the size of the bacterial community, monitor infection dynamics and respond accordingly by mobilizing the most appropriate defense mechanism according to the severity of the threat.