there is ambient temp sensor that will read the temp outside and based on it the a/c compressor kicks in , it usual acts up at high temperature
and will stop sending a ground to a/c clutch to activate , until it cools down and start working again.
1-But to confirm if you can have it scanned and read the fault codes in the a/c module and also they can pull up that ambient sensor live on the scanner screen and see if that temp sensor is working correctly.
2-if the a/c is cooling good when it is running , the most coming reason for that is the ambient sensor or the control head in the dash , where you actual control it inside the cabin , also might causes.
3- are the fans outside in the engine compartment are running when the a/c blows hot, is actually disengaging when hot , or still running and changes to hot inside the cabin.
just want to make sure do we have an electrical issue cutting off the a/c compressor or the compressor is running but inside the cabin the blend doors inside the dash are moving the blend doors to hot intermittently
Please let me know
ASE Certified Technician