Abstract Acquiring food in heterogeneous landscapes presents a challenge to many foragers, as searching for food in an optimal manner is difficult in spatially and temporally variable environments. Investigating individual foraging patterns can elucidate how environmental variations at different scales constrain or select for energy-optimizing movements, which can inform conservation and management strategies by identifying spatio-temporal variations in species’ habitat use. To test how such movements vary with environmental conditions, we investigated foraging patterns of the deposit-feeding sand-bubbler crab, Scopimera intermedia Balss, 1934 at multiple spatial and temporal scales on soft sediment shores in Hong Kong. On a broad, annual, scale the crabs produced foraging tracks of different length and foraged over different areas around their burrows between hot and cool seasons. Although foraging movements of the crabs were slower and more restricted during the cool season, probably due to low environmental temperatures, foraging areas during the hot season were larger but limited by increasing conspecific interactions. Over a smaller scale at which the crabs make movement decisions, parameters such as turning angle and speed were variable, even within individual foraging excursions. Such variations appeared to be responses to small-scale variations in sediment food patches, which resulted in the crabs employing multiple movement modes. This context-dependent foraging strategy enables the crabs to feed for a longer time in food-rich patches compared with a fixed strategy and is, therefore, critical for species living in environments such as intertidal sediments, where food distribution is heterogeneous and foraging time is constrained by the tide.