A separate fear system, flexibly gated by outcome uncertainty, guides decision-making to be both safe and efficient during exploration.