Tent caterpillars vigorously trash the anterior part of their bodies when they detect predators and parasitoids.  Such bouts of thrashing, which may be initiated by a single caterpillar, radiate rapidly though the colony and may result in group displays involving dozens of caterpillars
Such thrashing displays create a moving target for tachinid flies, wasps and other small parasitoids that lay their eggs on or in the body of the caterpillar.  They also clearly deter stink bugs and other timid predators.
Groups of caterpillars resting on the surface of the tent constitute aposematic displays.  Few birds other than the cuckoo find the hairy caterpillars palatable. The leaves of the cherry tree are cyanogenic and the caterpillars, like the fall webworm larva shown here, regurgitate cyanide ladened juices when disturbed.
Black-billed Cuckoo - eating tent caterpillars (13889933780)
Anti-predator Defense
The cuckoo is one of the few birds that preys upon the hairy caterpillars.