Agriculture has been central to the rise of the human-dominated world, consequently it is of great interest to us when we observe other species engaging in farming-like behaviours. Such behaviour has evolved repeatedly as seen in many species including bacteria, snails, damselfish and sloths. While ants are most famous for farming fungi, they are also prolific plant-farmers having evolved this so-called “ant-garden” behaviour a minimum of 15 times. How the origin of farming impacts ant genome evolution is unclear. Here, I use the genus Philidris (Dolichoderinae), which displays a spectrum of dependence – from facultative and generalist farmers to obligate and specialized ones—to trace the impact of farming on insect genomes. Using whole genome sequencing, I provide a strongly supported phylogeny based on over 2000 nuclear genes. Using this framework, I show that facultative agriculture has switched back and forth, while obligate agriculture evolved only once and was never lost. My work highlights various genomic drivers associated with the evolution of farming, such as the expansion of the olfactory gene repertoires as well as genes related to aggressiveness. Strikingly, the evolution of obligate dependence on plants is not associated with large genome size reduction as is currently the case in microbial endosymbiosis. This suggests that dependence on partners is mediated by fundamentally distinct mechanisms in mutualisms between macro-partners.