When you are faced with a danger or threat, the fight or flight response automatically kicks in, and you don’t have to think about it to set it off. So this is a quick reflex that occurs that bypasses the planning and awareness centers of the brain. Instead, the danger is picked up by the amygdala, the fear center of the brain. The amygdala then sets off the sympathetic nervous system and the hypothalamic-pituitary-adrenal axis (HPA axis), preparing and priming your body to either fight the danger or run from it. This occurs almost instantaneously when confronted with a serious threat.
Once your body is prepared and primed to either fight or flee, then the medial prefrontal cortex, the planning center of your brain, sends a signal to the amygdala to determine how to best protect yourself in the face of a serious threat.
So the answer is that the fight or flight response is reflexive at first, to get your body prepared and primed almost instantaneously, then the prefrontal cortex comes in immediately afterwards and mediates the decision to either fight or run.
What’s interesting is that in crickets, when nerve cells release the chemical nitric oxide, it signals to the cricket that it has lost the fight and needs to flee (Stevenson and Rilich, 2015). A similar chemical message in humans has yet to be determined. It definitely would be interesting if humans were also controlled by a chemical message that is not mediated by our planning and awareness centers.