1. Shelter building and petiole trenching in the Lepidoptera is a behaviour that mediates ecological pressures including those exerted by both food plants and natural enemies.
2. Fitness costs and benefits of trenching and shelter-building behaviour related to predation and larval performance were investigated in a pyralid species that inhabits and feeds on leaf shelters.
3. Assays comparing the performance of caterpillars feeding on trenched versus non-trenched foliage and fresh versus dry leaves were conducted. Whereas pupal weight was positively affected by petiole trenching, larval development was delayed when caterpillars fed on dry leaves.
4. A field experiment comparing predation on caterpillars inside and outside shelters demonstrated that predation was significantly higher for exposed caterpillars.
5. No physiological costs associated with shelter building were found given that caterpillars performed equally regardless of the number of shelters they built.
6. The effect sizes of top-down and bottom-up forces on pupal weight, development time, and predation risk indicated that the major effect of shelters is through the reduction of predation risk. The integration of experiments and natural history observations showed that fitness benefits provided by shelters change across ontogeny.