Chalcid wasps lay eggs in soft butterfly and moth pupae / chrysalises.
Chalcid wasps are small insects that lay eggs in soft moth and butterfly chrysalises. Wasp larvae hatch from the eggs. The larvae drink the hemolymph (blood) of the chrysalis. The chrysalis continues to live and mature for quite a few days. The chrysalis dies and the wasp larvae form pupae. When the wasp pupae mature, adult wasps emerge from the pupae and eat a tiny hole in the chrysalis. The wasps, from a few to hundreds, emerge from the chrysalis from the one or two holes they have eaten in the chrysalis.
The wasps immediately begin courtship and pairing and before long, female wasps are ready to lay eggs in fresh butterfly and moth chrysalises/pupae.