Your jar experiment revealed a fascinating biological drama. Those white "tubes" on the hornworm are cocoons of braconid wasps. Females inject eggs into the caterpillar; larvae feed internally, then emerge to spin cocoons. The tiny flying insects? Adult wasps.
Parasitized hornworms stop eating. Leave them be—the emerging wasps will patrol your garden, laying eggs in other hornworms. It's free, self-perpetuating pest control.
Don't kill parasitized caterpillars. If you must move one, relocate it to a tomato plant away from the house. The wasps are harmless to people and pets. Celebrate this sign of a balanced ecosystem.

Tomato hornworm with wasp cocoons

Hornworm feces
Moss-Like Growth on Trees: Epiphyte, Not Parasite
Black Fuzzy Caterpillar with Red Rings: Giant Leopard Moth Larva
Tomato Seeds Do Not Need Freezing: Simple Germination
Growing Tomatoes from Store-Bought Fruit: Hybrid vs. Heirloom
Hornworm Caterpillars on Petunias: Identification, Damage, and Biological Control
Growing Tomatoes: America's Favorite Garden Vegetable
Tomato Leaf Miner: A New Pest Alert
Tomato Catfacing: Temperature and Fertilizer Causes
Colorado Potato Beetle on Tomatoes: Identification and Control
Preventing Tomato Fruit Cracking
Skiff Moth Caterpillar: Harmless Slug-Like Larva
Tomato Leaf Miners: Identification and Integrated Management
Copyright © www.100flowers.win Botanic Garden All Rights Reserved