I've been messing with this trans for a month now.... Last fall I did a filter & fluid service, and have since learned I killed it by using the wrong fluid. The last 4 weeks I have torn my knuckles up removing the transmission and transfer case in my shop here in Iowa... Nothing else to do in a long Iowa winter

While I was at it I fixed several oil leaks, had the starter remaufactured, the alternator remanufactured, new valve cover gasket, new spark plugs, change oil filter housing gasket, new oil separator system valve/tubes....
All is back together, running very well... but for one thing. When heating up to operating temp, trans will shift with a little flare from 4 to 5, throw the little yellow gear light on the dash, and will just stay there in 4th gear. Stop the truck, try to drive off, still in 4th gear. Turn off engine for 10 seconds, restart, and it has healed itself. Will do this intermittently, but always lights up on the 4-5 shift, and always hangs there in that gear. Always heals itself when engine is turned off and restarted. My code reader will usually give me a "No codes found" message.
Since this seems both temperature related, and also electonically/ self healing, my study of the various laments online here point to the temp sensor in the internal trans wiring harness. BTW, the trans is the A5S390whatever (Can't remember the last letter) It's the French GM unit with the grenn sticker on the pan, Dexron VI. BTW, the Castrol Transmax Import Multivehicle ATF was what killed it.
The rebuild consisted of all the hard parts, clutches, steels, seals, torque converter, and all the electrical stuff in the valve body, all 5 solenoids, except for the internal harness, which has the temp sensor built in. The rebuild was done professionally, I just did the R&R with all of the various other things necessary to do it. The #6 to #10 pin on the electrical connector on the trans is the two that correspond to this temp sensor, book says I should be getting 5600 or so Ohms resistance.... It's hard to tell whether or not I'm on the right two pins, but one set says 20 ohms and the other set is open, neither of the two possible combos gives anything close to the temp sensor ranges given in the book.