Several species of melanized (Bblack yeast-like^) fungi in the order Chaetothyriales live in symbiotic association with ants inhabiting plant cavities (domatia) or with ants that use carton-like material for the construction of nests and tunnels. To investigate the genetic basis and evolution of this lifestyle, genomes of a lineage of four chaetothyrialean strains were sequenced and the genes annotated. While many members of Chaetothyriales have a large ensemble of enzymes enhancing tolerance of extreme or toxic environmental conditions, such as soil polluted with benzene, toluene, ethylbenzene, and xylene (BTEX), members of the domatia symbiont clade experienced significant gene family contractions. This includes enzymes involved in detoxification processes such as cytochrome P450s, transporters, and alcohol dehydrogenases. Overall, the genomes of domatiaassociated species are relatively small compared to other Chaetothyriales, with low numbers of protein-coding genes and with a high content of repetitive elements. Biosynthetic clusters involved in the production of secondary metabolites and with potential antimicrobial activities are overrepresented in the genomes of these fungi. We speculate that, despite the reduction of several protein families, members of the domatia-associated clade might tolerate, and perhaps even metabolize, toxic compounds produced from exocrine glands of the ants as defense against microbes. In addition, in this symbiotic association, the plant and the ants could benefit from the production of secondary metabolites by the Chaetothyriales that participate in this tripartite association. We consider a new ecological classification for Chaetothyriales based on genomic features: (i) derived species with high abundance of paralogs colonizing habitats rich in polyaromatic and (ii) potential producers of secondary metabolites with antimicrobial activities, beneficial for symbiotic interactions, occupying specific micro-habitats such as ant domatia.