I think it's a wasp. The holes are the wasps emerging as they parasitize the cocoons prior.