Remaining immobile for an unpredictable period after being touched by a potential predator (post‐contact immobility, PCI) may favor survival. However, the factors that determine variation in PCI duration are poorly understood. We tested whether PCI duration depends on the surrounding conspecific density (the selfish prey hypothesis) in the tropical antlion larvae Myrmeleon crudelis. These insects avoid predation by being immobile or burying themselves. The selfish prey hypothesis predicts a reduction in the PCI duration as conspecific density increases because this high density of conspecifics around can stimulate the redirection of the predator's interest in other nearby potential prey. In the field, we measured PCI and found that its duration was independent of the conspecific density. In the lab, we also measured the PCI of a subset of the same larvae in the absence of neighbors. Using a paired design, we found that PCI duration was lower in the lab in the absence of neighbors than in the field. Our results suggest that the antlion larvae did not follow the selfish prey hypothesis. We propose two alternative explanations. First, the larvae have a limited ability to detect neighbors in the field and keep up with the changing number of surrounding active pits. Second, burying may be more important than PCI as an antipredator strategy. In our lab experiment, larvae had a more accurate idea of the conspecific density around their pit because they explored the area. We propose that knowing the absence of conspecifics triggered a shorter PCI duration. Under a high predation risk (i.e., no other prey to which the predator would redirect its attention), the larvae select the unequivocal antipredator behavior of burying. This work illustrates the relevance of accurate information in deciding how to avoid predation, especially when prey can prioritize between alternative behaviors, with success varying between the contexts.