Horntails, also known as wood wasps, are non-stinging, wood-eating insects that lay their eggs deep within trees. Both male and female horntails have a pointed spine at the tip of their abdomen; females also have a long, slender ovipositor. (They get their name not from their spine or ovipositor, but from a knob (cornus) at the tip of their abdomen.)
Pigeon Tremex Horntails (Tremex columba) are active in late summer and early fall. A mated female inserts her ovipositor several inches into a dead or dying tree and lays an egg (where it is safe from most, but not all, predators). Along with the egg the adult horntail deposits some white rot fungus (Daedalea unicolor) which she stores in special abdominal glands. The fungus breaks down and softens the wood for the horntail larva to eat and is required for the successful development of the horntail. The larva typically begins consuming the soft, fungus-ridden wood around it, and then chews its way to the inner bark so as to provide a means of exiting the tree when it becomes an adult. The larva then returns to feed on inner wood. It completes its metamorphosis and emerges from the tree within a year as a winged adult horntail.
There is a parasitic wasp, the Giant Ichneumon Wasp (Megarhyssa macrurus), which possesses a long three-inch ovipositor capable of drilling into trees. There are several theories as to how this parasitic wasp detects the presence of horntail larvae deep within the tree. She may lay her antennae on the outside of a tree and pick up the vibrations of horntail larvae gnawing away in their wood chambers. Another theory proposes that the female wasp uses her antennae to smell the frass (droppings) of the horntail larva as well as the wood-softening fungus. Once she locates a horntail larva, the ichneumon wasp paralyzes it and then lays an egg on it. The ichneumon wasp larva feeds on the paralyzed horntail larva, consuming it completely within a couple of weeks. The ichneumon wasp then pupates and remains dormant under the bark until the following summer, when the adult emerges.