Identifying the traits that foster group survival in contrasting environments is important for understanding local adaptation in social systems. Here we evaluate the relationship between the aggressiveness of social spider colonies and their persistence along an elevation gradient using the Amazonian spider, Anelosimus eximius. We found that colonies of A. eximius exhibit repeatable differences in their collective aggressiveness, and that colony aggressiveness is linked with persistence in a site-specific manner. Less aggressive colonies are better able to persist at high-elevation sites, which lack colony-sustaining large-bodied prey, whereas colony aggression was not related to chance of persistence at low-elevation sites. This suggests resistance to resource limitation through docility promotes colony survival at high elevations. These data reveal that the collective phenotypes that relate to colony persistence vary by site, and thus, the path of social evolution in these environments is likely to be affected.