AbstractRapid advances in cellular engineering1,2have positioned synthetic biology to address therapeutic3,4and industrial5problems, but a significant obstacle is the myriad of unanticipated cellular responses in heterogeneous environments such as the gut6,7, solid tumors8,9, bioreactors10or soil11. Complex interactions between the environment and cells often arise through non-uniform nutrient availability, which can generatebidirectionalcoupling as cells both adjust to and modify their local environment through different growth phenotypes across a colony.12,13While spatial sensing14and gene expression patterns15–17have been explored under homogeneous conditions, the mutual interaction between gene circuits, growth phenotype, and the environment remains a challenge for synthetic biology. Here, we design gene circuits which sense and control spatiotemporal phenotype patterns in a model system of heterogeneous microcolonies containing both growing and dormant bacteria. We implement pattern control by coupling different downstream modules to a tunable sensor module that leveragesE. coli⁉sstress response and is activated upon growth arrest. One is an actuator module that slows growth and thereby creates an environmental negative feedback via nutrient diffusion. We build a computational model of this system to understand the interplay between gene regulation, population dynamics, and chemical transport, which predicts oscillations in both growth and gene expression. Experimentally, this circuit indeed generates robust cycling between growth and dormancy in the interior of the colony. We also use the stress sensor to drive an inducible gating module that enables selective gene expression in non-dividing cells. The ‘stress-gated lysis circuit’ derived from this module radically alters the growth pattern through elimination of the dormant phenotype upon a chemical cue. Our results establish a strategy to leverage and control the presence of distinct microbial growth phenotypes for synthetic biology applications in complex environments.