Behavioral flexibility, including an ability to modify feeding behavior, is a key trait enabling primates to survive in forest fragments. In human-dominated landscapes, unprotected forest fragments can become progressively degraded, and may be cleared entirely, challenging the capacity of primates to adjust to the changes. We examined responses of wild chimpanzees (Pan troglodytes schweinfurthii) to major habitat change: that is, clearance of forest fragments for agriculture. Over 7 years, fragments in Bulindi, Uganda, were reduced in size by 80%. We compared the chimpanzees' diet at the start and end of this period of rapid deforestation, using data derived mainly from fecal analysis. Similar to other long-term study populations, chimpanzees in Bulindi have a diverse diet comprising over 169 plant foods. However, extensive deforestation seemed to impact their feeding ecology. Dietary changes after fragment clearance included reduced overall frugivory, reduced intake of figs (Ficus spp.; formerly a dietary "staple" for these chimpanzees), and reduced variety of fruits in fecal samples. Nevertheless, the magnitude of most changes was remarkably minor given the extent of forest loss. Agricultural fruits increased in dietary importance, with crops accounting for a greater proportion of fruits in fecal samples after deforestation. In particular, cultivated jackfruit (Artocarpus heterophyllus) became a "staple" food for the chimpanzees but was scarcely eaten before fragment clearance. Crops offer some nutritional benefits for primates, being high in carbohydrate energy and low in hard-to-digest fiber. Thus, crop feeding may have offset foraging costs associated with loss of wild foods and reduced overall frugivory for the chimpanzees. The adaptability of many primates offers hope for their conservation in fragmented, rural landscapes. However, long-term data are needed to establish whether potential benefits (i.e. energetic, reproductive) of foraging in agricultural matrix habitats outweigh fitness costs from anthropogenic mortality risk for chimpanzees and other adaptable primates. K E Y W O R D S behavioral flexibility, crop feeding, deforestation, foraging adaptations, fragmentation, unprotected habitats