Climate-driven geographic range shifts have been associated with transitions between dietary specialism and generalism at range margins. The mechanisms underpinning these often transient niche breadth modifications are poorly known, but utilization of novel resources likely depends on phenological synchrony between the consumer and resource. We use a climate-driven range and host shift by the butterfly Aricia agestis to test how climate-driven changes in host phenology and condition affect phenological synchrony, and consider implications for host use. Our data suggest that the perennial plant that was the primary host before range expansion is a more reliable resource than the annual Geraniaceae upon which the butterfly has become specialized in newly colonized parts of its range. In particular, climate-driven phenological variation in the novel host Geranium dissectum generates a narrow and variable 'window of opportunity' for larval productivity in summer. Therefore, although climatic change may allow species to shift hosts and colonise novel environments, specialization on phenologically limited hosts may not persist at ecological margins as climate change continues. We highlight the potential role for phenological (a)synchrony in determining lability of consumer-resource associations at range margins and the importance of considering causes of synchrony in biotic interactions when predicting range shifts. This article is part of the theme issue 'Species' ranges in the face of changing environments (Part II)'.