Braconid wasps lay their eggs in caterpillars. The eggs hatch and the parasitoid larvae feed on the body fluids of their caterpillar host. (The specific characters in this story are the braconid parasitoid wasp Glyptapanteles sp. and Thyrinteina leucocerae caterpillars, which are in the geometer moth family (Geometridae).)
The caterpillar continues feeding, moving, and growing, seemingly unfazed. Full grown parasitoid larvae emerge together through the host’s skin and start pupating nearby.
The caterpillar is still alive but brainwashed. It stops feeding and becomes a bodyguard: protecting the wasp pupae against predators with violent head swings. Protect-and-serve caterpillars expire soon after the parasitoids emerge from their pupae as adults: fortuitous timing for the wasps.