There are many species of Agromyzidae which feed as external stem miners, with several in the Ophiomyia genus feeding in this manner. The larva feeds just under the epidermis of the stem, creating a slender corridor which is often difficult to observe. Some species vacate the mine to pupariate whilst others, such as Ophiomyia melandricaulis Hering, 1943, remain in the mine with the puparium often visible, as shown in the image below.

Ophiomyia melandricaulis Hering, 1943 stem mine on Silene dioica with puparium just below stem node © Barry P. Warrington

Ophiomyia heringi Starý, 1930 larva feeding under epidermis of Campanula sp. stem © Barry P. Warrington