Temperate viruses can become dormant in their host cells, a process called lysogeny. In every infection, such viruses decide between the lytic and the lysogenic cycles, that is, whether to replicate and lyse their host or to lysogenize and keep the host viable. Here we show that viruses (phages) of the SPbeta group use a small-molecule communication system to coordinate lysis–lysogeny decisions. During infection of its Bacillus host cell, the phage produces a six amino-acids-long communication peptide that is released into the medium. In subsequent infections, progeny phages measure the concentration of this peptide and lysogenize if the concentration is sufficiently high. We found that different phages encode different versions of the communication peptide, demonstrating a phage-specific peptide communication code for lysogeny decisions. We term this communication system the ‘arbitrium’ system, and further show that it is encoded by three phage genes: aimP, which produces the peptide; aimR, the intracellular peptide receptor; and aimX, a negative regulator of lysogeny. The arbitrium system enables a descendant phage to ‘communicate’ with its predecessors, that is, to estimate the amount of recent previous infections and hence decide whether to employ the lytic or lysogenic cycle. Some phages—viruses that infect bacteria—encode peptides that are secreted from infected cells and that, beyond a certain threshold, stimulate other viruses to switch from the lytic (killing the host cell) to lysogenic (dormant) phase. Bacteria secrete signalling molecules that allow them to perceive their population density and change their behaviour accordingly. In an exciting turn of events, while searching for bacterial communication systems, Rotem Sorek and colleagues found that some phages—viruses that infect bacteria—encode peptides that are secreted from infected cells and sensed by the viral population. Beyond a certain threshold, the viruses switch from employing the lytic cycle, in which they kill the host cell, to the lysogenic cycle, in which they avoid killing off their hosts. This is the first viral communication system to have been described.