Hello and Thank you for choosing Just Answer.
The F150 going into the failsafe mode is a fairly common problem that I see. It either leads to a bad Throttle Positon Sensor (TPS) or a bad Electronic Throttle Actuator. To determine the problem, the vehilce will need to be scanned with a scan tool so diagnostic trouble codes can be recieved. If a code P2106 or P135 is present the TPS is too balme and will need to be replaced along with a reprogramming of the PCM or Powertrain Control Module. If no codes are present, I would suspect the throttle body being faulty.