The interaction between Botanophila flies and Epichloë fungi is one of the few interactions in which grass-associated fungi are ‘pollinated’ by flies. We analysed the gains and losses for both interaction partners and the time factors determining cost dynamics. A hypothesis regarding the relationship between changes in the severity of grass infection with Epichloë fungus, size of fungal sexual structures (stromata), and fly presence (expressed as egg and larvae numbers) was tested. During a 3-year study conducted on permanent field plots, fungal infection of wild grass tussocks of Holcus lanatus and fly visits to fungal stromata were monitored. An increase in the number of shoots with stromata and a reduction in stromata size were observed. From one year to another, flies deposited fewer eggs on stromata, and larval body mass decreased. We explain these results by the deterioration of grass condition due to increased Epichloë infection, which resulted in higher maintenance costs for the fungal parasite.