Laboratory and field data show that the digging habits of ants and the resulting nest architecture varywith soil conditions, yet, the geomechanical understanding of ant tunneling is lacking.We study the excavation strategies used by harvester ants in clay, silt, sand, and gravel at water contents that range from dry to saturated. The study focuses on the conditions at the tunnel face that determine particle removal methods, digging rate, the development of branches, and tunneling patterns. Analytical and numerical models provide particle-level insight into the experimental observations and help identify the causal links that relate ants digging performance and nest geometric patterns with the properties of the granular medium such as grain size, moisture, and packing density. Results highlight ants’ exceptional ability to sense the prevailing geomechanical conditions in tunnels, and to adapt excavation strategies, transport methods and tunneling patterns to those conditions, within their inherent size and strength limitations. The resulting tunnel structure emerges as a mechanically-convenient and energy-efficient topology based on local information gather by ants along the tunnel and at the tunnel face.