Many auto trans owners experience rapid torque convertor locking and unlocking. This CAN be caused by a faulty APPS sensor. BUT often times is caused by the DIRTY CONNECTIONS or alternator leaking AC current into the APPS circuit. I have included 4 links to educate you on other possible solutions to the problem. I'm not a "Parts Pusher".
The first link is how to install a torque converter lock up switch  
 
http://www.tstproducts.com/Torque%20Converter%20Lockup%20Switch.pdf
 
http://www.trnw.net/estore/catalog/product_info.php?cPath=21&products_id=30
 
https://www.atsdiesel.com/PDF/120505/4th%20hunt%2046%2047%20RE.pdf
 
http://www.cumminsforum.com/forum/98-5-02-powertrain/90864-100-cure-overdrive-hunt-fix-4th-gear-hunt-fix.html
 
 
 
If your having transmission issues with the torque converter locking and unlocking or 3rd-4th hunting,try these things first.
 
1 Clean battery terminals and body grounds
2 Clean ground strap at PCM located at passengers side firewall.
3 Remove and inspect the middle plug on PCM, this is the plug that contains transmission control wires.Clean with contact cleaner.
4 Remove, inspect and clean 8 wire plug located on drivers side of transmission
5 Remove, inspect and clean speed sensor plug located at tail housing of transmission, replace sensor if needed. It is an inexpensive sensor.