Taken from mechanic on Ford truck forum:
Might be worth considering.
Ok here is what you need to do the wrench light is coming on due to either a trans malfunction or a throttle body malfuntion. You need to take to ford dealer and have the codes ran to determine what codes you have. If the throttle position sensor that is built in the throttle body is intermittenly acting up that will cause your problem. Also there is a oss sensor (output speed shaft) that is internal to trans where the valve body mounts that has given us some problems as well but after you have the codes read we will have a better understanding of what is going on and which system is causing your problem let me know what you have so we can get to the bottom of the problem.Hope this information helps thanks