Streptococcal competence-stimulating peptides (CSPs) were once thought to passively communicate population density in a process known classically as quorum sensing. However, recent evidence has shown that these peptides may also be inducible 'alarmones,' capable of conveying sophisticated messages in a population including the induction of altruistic cellular suicide under stressful conditions. We have previously characterized the alarmone response in Streptococcus mutans, a cariogenic resident of the oral flora, in which a novel bacteriocin-like peptide causes cell death in a subset of the population. Our objective in this work was to characterize the mechanism of immunity to cell death in S. mutans. Toward this goal, we have identified the conditions under which immunity is induced, and identified the regulatory system responsible for differential (and protective) expression of immunity. We also showed that CSP-induced death contributes to S. mutans biofilm formation through the release of chromosomal DNA into the extracellular matrix, providing a long sought-after mechanistic explanation for the role of CSP in S. mutans biofilm formation.