Global conversion of natural habitats to agriculture has led to marked changes in species diversity and composition. However, it is less clear how habitat modification affects interactions among species. Networks of feeding interactions (food webs) describe the underlying structure of ecological communities, and might be crucially linked to their stability and function. Here, we analyse 48 quantitative food webs for cavity-nesting bees, wasps and their parasitoids across five tropical habitat types. We found marked changes in food-web structure across the modification gradient, despite little variation in species richness. The evenness of interaction frequencies declined with habitat modification, with most energy flowing along one or a few pathways in intensively managed agricultural habitats. In modified habitats there was a higher ratio of parasitoid to host species and increased parasitism rates, with implications for the important ecosystem services, such as pollination and biological control, that are performed by host bees and wasps. The most abundant parasitoid species was more specialized in modified habitats, with reduced attack rates on alternative hosts. Conventional community descriptors failed to discriminate adequately among habitats, indicating that perturbation of the structure and function of ecological communities might be overlooked in studies that do not document and quantify species interactions. Altered interaction structure therefore represents an insidious and functionally important hidden effect of habitat modification by humans.