A chimical signal allows flexible sex allocation in a hermaphroditic polichaete worm.