In social groups, individuals' dominance rank, social bonds, and kinship with other group members have been shown to influence their foraging behavior. However, there is growing evidence that the particular effects of these social traits may also depend on local environmental conditions. We investigated this by comparing the foraging behavior of wild chacma baboons, Papio ursinus, under natural conditions and in a field experiment where food was spatially clumped. Data were collected from 55 animals across two troops over a 5-month period, including over 900 agonistic foraging interactions and over 600 food patch visits in each condition. In both conditions, low-ranked individuals received more agonism, but this only translated into reduced foraging performances for low-ranked individuals in the high-competition experimental conditions. Our results suggest one possible reason for this pattern may be low-ranked individuals strategically investing social effort to negotiate foraging tolerance, but the rank-offsetting effect of this investment being overwhelmed in the higher-competition experimental environment. Our results also suggest that individuals may use imbalances in their social bonds to negotiate tolerance from others under a wider range of environmental conditions, but utilize the overall strength of their social bonds in more extreme environments where feeding competition is more intense. These findings highlight that behavioral tactics such as the strategic investment of social effort may allow foragers to mitigate the costs of low rank, but that the effectiveness of these tactics is likely to be limited in certain environments.