Parasitoids
By far the most important mortality factor are parasitoides. Very commonly, when opening a mine, one can encounter a parastoid larva that is succking the liquified contents of its host. It is impressive to see how an, often quite small, parasitoid, has overpowered its victim that is almost motionless and has its colour and transparancy totally altered. Often the immobility of the larva is the result of a paralysing or deadly sting by a wasp during oviposition. Parasitoid females may also sting a larva without oviposition, often to drink the haemolymph of the victim.
Agromyza nana on Clover
endoparasitoids
Parasitoid larvae may also occur inside the of their host. They are recognisable only when the host has been made transparant by chemical treatment, and even then only if the parasitoid is sufficiently chitinised.
parasitoid in Pegomyua hyoscymai
scars
Small black spots on a larvae are scars, and almost invariably the result of oviposition by an (endo-)parasitoid.
Amauromyza flavifrons on Red Campion
also pupae
Generally a parasitised larva dies before pupation, but not always.
Phyllonorycter comparella on Grey Poplar
exit
The small hole in the mine tells that a parasitoid has left this mine.
Cameraria ohridella on Horse Chestnut
mine of Phytomyza minuscula on Columbine: empty parasitoid pupa, with exit opening
sawflies
A parasitoid egg has been attached to the first abdominal segment. The egg narrows into a stalk of variable length, that is firmly attached to the host by a strongly chitinised subcutaneous anchor. These eggs only occur on sawfly larvae.
Metallus lanceolatus on Wood Avens
The eggs are of the ichneumon fly genus Grypocentrus (Ichneumonidae, Tryphoninae).
The foto below shows the egg of G. albipes Ruthe, a species that only attacks Fenusa pumila. This sawfly has been accidentally introduced from Europe into North America, and has become a serious pest. To combat it one has introduced G. albipes by way of biological control. (Leo Blommers, pers. comm.; Eichhorn & Pschorn-Walcher, 1973a, Guèvremont & Quednau, 1977a).
Fenusa pumila on Birch
Braconidae
Cocoon of a braconid in a tentiform mine; the crumpled remnant of the miner is still there. The parasitoid belongs to the genus Pholetesor (Braconidae, Microgastrinae).
Parasitoids in their turn may fall victim to hyperparasitoids. Using the free space in a tentiform mine by suspending the cocoon it this way makes the cocoon les easily accessible to the ovipositors of enemies (thanks to Kees van Achterberg, Leiden and Mark R Shaw, Edinburgh, for this information).
Phyllonorycter klemannella on Alder
Encyrtidae
The opened cocoon in this tentiform mine contains six parasitoid cocoons, rather than one moth pupa. Cocoons of this type belong to the Encyrtidae genus Holcothorax (LHM Blommers, pers. comm.)
Phyllonorycter rajella on Alder
Eulophidae
Five parasitoid pupae in a tentiform mine. No trace of the host has been left
a pupa, dorsal; pupae of this type belong to Chrysocharis, or a related genus (Theo Gijswijt, pers. comm.)
ventral
Entonopathogenic fungi
Several groups of fungi develop as fatal disease agents on living insects. By itself the mining way of life would seem an effectieve protection against infection by fungal spores. The picture below shows that this protection is not perfect, even in a species of which the larva never leaves its mine except finally for pupation.

Quercus robur, Duin en Kruidberg. This larva has fallen victim to an entomopathogenic fungus, perhaps related with Cordyceps; a sword-like fruiting of c. 5 mm penetrated the epidermis of the mine.
references
Bernardo, Pedata & Viggiani (2006a), Zwakhals & Blommers (2022a).