Xenophagy, the process of eliminating intracellular pathogens through the autophagy machinery, is an important defense mechanism against infectious disease, yet the underlying molecular mechanisms remain incompletely understood. Recent work (Xu et al., Cell, 2019) used the discovery of an inhibitor of xenophagy, SopF, to identify a SopF-sensitive mechanism that allows mammalian cells to detect invading bacteria.