In mutualistic interactions, partners obtain a net benefit, but there may also be costs associated with the provision of benefits for a partner. The question of whether aphids suffer such costs when attended by ants has been raised in previous work. Transgenerational effects, where offspring phenotypes are adjusted based on maternal influences, could be important in the mutualistic interaction between aphids and ants, in particular because aphids have telescoping generations where two offspring generations can be present in a mature aphid. We investigated the immediate and transgenerational influence of ant tending on aphid life history and reproduction by observing the interaction between the facultative myrmecophile Aphis fabae and the ant Lasius niger over 13 aphid generations in the laboratory. We found that the effect of ant tending changes dynamically over successive aphid generations after the start of tending. Initially, total aphid colony weight, aphid adult weight and aphid embryo size decreased compared with untended aphids, consistent with a cost of ant association, but these differences disappeared within four generations of interaction. We conclude that transgenerational effects are important in the aphid–ant interactions and that the costs for aphids of being tended by ants can vary over generations.Electronic supplementary materialThe online version of this article (doi:10.1007/s00442-013-2659-y) contains supplementary material, which is available to authorized users.