Not sure if this is your problem but had a similar problem going on with my truck use the scan tool truck never said any codes but found that the PCM would not read the ECM truck gave me the same symptoms that you're having when the motor was cold it would run once it warmed up to temperature shut off so I removed the ECM put it in my refrigerator to cool all the circuits once cool down was able to get the scan tool so that the PCM would read the ECM the result was a failing ECM once ECM start warming up with the electrical voltage flowing through it it would kick out. Reading it replace the ECM was what problem