Looks like the remains of an Anestia caterpillar which was infected with wasp parasitoid larvae which haved emerged from the caterpillar and pupated in little white cocoons.
@donhe it was alive moving towards the pupa case and grabbed it with its jaws before it realised it couldn’t eat it. One of the photos from above you can see it grabbing the case - hopefully it hasn’t pixelated too much!