The genetic adaptation of pathogens in host tissue plays a key role in the establishment of chronic infections. While whole genome sequencing has opened up the analysis of genetic changes occurring during long-term infections, the identification and characterization of adaptive traits is often obscured by a lack of knowledge of the underlying molecular processes. Our research addresses the role of Pseudomonas aeruginosa small colony variant (SCV) morphotypes in long-term infections. In the lungs of cystic fibrosis patients, the appearance of SCVs correlates with a prolonged persistence of infection and poor lung function. Formation of P. aeruginosa SCVs is linked to increased levels of the second messenger c-di-GMP. Our previous work identified the YfiBNR system as a key regulator of the SCV phenotype. The effector of this tripartite signaling module is the membrane bound diguanylate cyclase YfiN. Through a combination of genetic and biochemical analyses we first outline the mechanistic principles of YfiN regulation in detail. In particular, we identify a number of activating mutations in all three components of the Yfi regulatory system. YfiBNR is shown to function via tightly controlled competition between allosteric binding sites on the three Yfi proteins; a novel regulatory mechanism that is apparently widespread among periplasmic signaling systems in bacteria. We then show that during long-term lung infections of CF patients, activating mutations invade the population, driving SCV formation in vivo. The identification of mutational “scars” in the yfi genes of clinical isolates suggests that Yfi activity is both under positive and negative selection in vivo and that continuous adaptation of the c-di-GMP network contributes to the in vivo fitness of P. aeruginosa during chronic lung infections. These experiments uncover an important new principle of in vivo persistence, and identify the c-di-GMP network as a valid target for novel anti-infectives directed against chronic infections.