Consumers can potentially adjust their diet in response to changing resource abundances, thereby achieving better foraging payoffs. Although previous work has explored how such adaptive foraging scales up to determine the structure and dynamics of food webs, consumers may not be able to perform perfect diet adjustment due to sensory or cognitive limitations. Whether the effectiveness of consumers' diet adjustment alters food-web consequences remains unclear. Here, we study how adaptive foraging, specifically the effectiveness (i.e. rate) with which consumers adjust their diet, influences the structure, dynamics, and overall species persistence in synthetic food webs. We model metabolically-constrained optimal foraging as the mechanistic basis of adaptive diet adjustment and ensuing population dynamics within food webs. We compare food-web dynamical outcomes among simulations sharing initial states but differing in the effectiveness of diet adjustment. We show that adaptive diet adjustment generally makes food-web structure resilient to species loss. Effective diet adjustment that maintains optimal foraging in the face of changing resource abundances facilitates species persistence in the community, particularly reducing the extinction of top consumers. However, a greater proportion of intermediate consumers goes extinct as optimal foraging becomes less-effective and, unexpectedly, slow diet adjustment leads to higher extinction rates than no diet adjustment at all. Therefore, food-web responses cannot be predicted from species' responses in isolation, as even less-effective adaptive foraging benefits individual species (better than non-adaptive) but can harm species' persistence in the food web as a whole (worse than non-adaptive). Whether adaptive foraging helps or harms species coexistence has been contradictory in literature. Our finding that it can stabilise or destabilise the food web depending on how effectively it is performed help reconcile this conflict. Inspired by our simulations, we deduce that there may exist a positive association between consumers' body size and adaptive-foraging effectiveness in the real world. We also infer that such effectiveness may be higher when consumers cognise complete information about their resources, or when trophic interactions are driven more by general traits than by specific trait-matching. We thereby suggest testable hypotheses on species persistence and food-web structure for future research, in both theoretical and empirical systems.