Marginal populations usually have low densities and are considered to be particularly vulnerable to environmental stochasticity. Using data collected in nest boxes, we analyzed the breeding performance of the edible dormouse (Glis glis), an obligate hibernating rodent and a seed predator in deciduous forests, in two populations at the distribution range's edge. Despite being only 20 km apart from each other, Montseny is a large patch of mixed deciduous forests (oaks and beech), whereas Montnegre would be the harshest habitat, that is, a small, isolated patch with only oaks. First, we studied the differences in climate and tree cover change in the two populations. Second, we analyzed the direct and indirect roles of local climate conditions and seed availability on breeding performance over 10 years in each population. Finally, we explored the influence of tree cover change on the occupancy dynamics in the two populations. Our results showed contrasting responses between populations: in Montseny, asynchronous seed production between oaks and beech precluded skip breeding, and breeding performance increased with seed availability. Furthermore, dormice in Montseny may use pollen production to anticipate the amount of beech nut resources and adjust their breeding effort. Boxes showed higher occupancy and colonization and fewer extinctions in Montseny than in Montnegre, where seed availability did not drive breeding performance. Results from Montnegre suggest that skip breeding was an adaptive response to a more pulsed, harsher environment. Here, females produced a similar number of pups than at Montseny. Long-term studies dealing with population responses in marginal habitats can lead to a deeper understanding of the capacities of organisms to adapt to harsh environments. Although local adaptation is frequently documented across various taxa, studies at the distribution edge may shed light on our still limited comprehension of the underlying mechanisms responsible for its occurrence.