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.