Strange behaviour of caterpillar

Strange behaviour of caterpillar

Observation - Strange behaviour of caterpillar - UK and Ireland. Description: Caterpillar appears to be tending group of pupae (or eggs) of unrelated insects and remained in the position photographed here without appearing to feed for more than a week. One of the photos is taken from inside the house. I did not observe the hatching

Caterpillar appears to be tending group of pupae (or eggs) of unrelated insects and remained in the position photographed here without appearing to feed for more than a week. One of the photos is taken from inside the house. I did not observe the hatching but the resident told me they seemed to have been flies. Can anyone help with identification and explanation? Photos from other angles available if required.