  After their generation, cosmological backgrounds of gravitational waves
propagate nearly freely but for the expansion of the Universe and the
anisotropic stress of free-streaming particles. Primordial signals -- both that
from inflation and the infrared spectrum associated to subhorizon production
mechanisms -- would carry clean information about the cosmological history of
these effects. We study the modulation of the standard damping of gravitational
waves by free-streaming radiation due to the decoupling (or recoupling) of
interactions. We focus on nonstandard neutrino interactions in effect after the
decoupling of weak interactions as well as more general scenarios in the early
Universe involving other light relics. We develop semianalytic results in fully
free-streaming scenarios to provide intuition for numerical results that
incorporate interaction rates with a variety of temerpature dependencies.
Finally, we compute the imprint of neutrino interactions on the $B$-mode
polarization of the cosmic microwave background, and we comment on other means
to infer the presence of such effects at higher frequencies.
