Arboreal embryos of red-eyed treefrogs, Agalychnis callidryas, hatch prematurely in response to hypoxia when flooded and mechanosensory cues (MC) in snake attacks, but hatching later improves tadpole survival. We studied ontogenetic changes in risk assessment and hatching performance of embryos in response to flooding and physical disturbance. We hypothesized that risk assessment decreases as hatchling survival improves and hatching performance increases as embryos develop. Because snakes eat faster than embryos asphyxiate, we hypothesized that embryos decide to hatch sooner and hatch faster in response to MC. We video-recorded individual embryos hatching in response to each cue type, then compared the incidence and timing of a series of events and behaviors from cue onset to complete hatching across ages and stimuli. Latency from cue to hatching decreased developmentally in both contexts and was shorter with MC, but the elements contributing to those changes differed. Hypoxia-assessment involved position changes, which decreased developmentally along with assessment time. MC-assessment was passive, faster, and also decreased with age. The first stages of hatching, membrane rupture and head emergence, were surprisingly age-independent but faster with MC, congruent with greater effort under more immediate risk. In contrast, body emergence and compression showed ontogenetic improvement consistent with morphological constraints but no cue effect. Both appropriate timing and effective performance of hatching are necessary for continued development. Different stages of the process vary with development and environmental context, suggesting combinations of adaptive context- and stage-dependent behavior, cue-related constraints on information acquisition, and ontogenetic constraints on elements of performance.Summary statementDevelopment reduces risk assessment and improves hatching performance by red-eyed treefrog embryos in both flooding and simulated attacks. Predation cues elicit faster decisions and hatching, congruent with more immediate risk.