Throttle problems in a diesel

I have a 1997 F-250 7.3 powerstroke diesel with 135,000 miles and an EO4 automatic transmission. The trucks engine light will come on and the fuel pedal will become unresponsive. Until I release the pedal then reapply pressure to it the truck will remain at an idle. Sometimes I can tell it is going to happen as the shifting of the transmission at low speed will be irratic, shifting quickly into third at very low speed and RPM. I also have noticed that the light for the OD on the shift handle will light up at the same time the failure happens. I have a local mechanic that is familiar with the 7.3 engine and he cannot diagnose it unless it is failing in the shop. It only does it while driving, and the failure goes away as soon as I release the pedal. Any ideas?

Wow, first post deleted apparently, this is actually the wrong forum to post this query,but get in touch with the Navistar or International folks if the Ford Guys cant help you-Kevin

If there’s a throttle position sensor it might be failing.

Have the linkages, cables, etc been inspected for binding?