Limbless animals like snakes inhabit most terrestrial environments, generating thrust to overcome drag on the elongate body via contacts with heterogeneities. The complex body postures of some snakes and the unknown physics of most terrestrial materials frustrates understanding of strategies for effective locomotion. As a result, little is known about how limbless animals contend with unplanned obstacle contacts. We studied a desert snake, Chionactis occipitalis, which uses a stereotyped head-to-tail traveling wave to move quickly on homogeneous sand. In laboratory experiments, we challenged snakes to move across a uniform substrate and through a regular array of force-sensitive posts. The snakes were reoriented by the array in a manner reminiscent of the matter-wave diffraction of subatomic particles. Force patterns indicated the animals did not change their self-deformation pattern to avoid or grab the posts. A model using open-loop control incorporating previously described snake muscle activation patterns and body-buckling dynamics reproduced the observed patterns, suggesting a similar control strategy may be used by the animals. Our results reveal how passive dynamics can benefit limbless locomotors by allowing robust transit in heterogeneous environments with minimal sensing.