Abstract:Against the backdrop of increasing global economic uncertainty and accelerated domestic economic transformation, urban economic resilience has become a crucial indicator for regional sustainable development. As a key characteristic of urban economic structures, industrial agglomeration affects economic resilience differently through specialization and diversification modes, yet their exact impacts remain debated—especially in China’s economically vital Yangtze River Delta region. This study examines 27 Yangtze River Delta cities from 2005 to 2023, focusing on how different agglomeration patterns influence economic resilience. Key questions include: (1) How do specialization and diversification affect economic resilience through different mechanisms? (2) What role does innovation capacity play in these relationships? Using panel quantile regression, moderation effect models, and threshold regression analysis, we develop an “agglomeration-innovation-resilience” framework to systematically investigate these dynamics. The study reveals how innovation capacity moderates these relationships and identifies critical threshold effects. Key findings reveal that diversified agglomeration consistently enhances resilience across all quantiles, whereas specialized agglomeration exhibits a threshold effect, benefiting only cities above the median resilience level. Urban innovation capacity positively moderates diversification’s resilience effect but shows no influence on specialization. Notably, specialization and resilience demonstrate a U-shaped relationship contingent on innovation, governed by a single threshold effect. These findings advance theoretical debates on “specialization versus diversification” by unraveling their heterogenous resilience mechanisms. Practically, they inform evidence-based policies for the Yangtze River Delta, advocating optimized agglomeration strategies and tiered innovation capacity-building to bolster economic resilience.