Check refrigerant pressures first. This is a common symptom of low refrigerant. As the system runs, the low side pressure will drop during certain events (like hitting the gas). If it gets too low (typically around 20-25 PSI), it will cut off the compressor until the pressure climbs back up to the minimum threshold to turn on (either in the 40 or 50 PSI range). I prefer to check this using actual gauges and then working from there. If you have a tech 2, you can compare what the PCM is seeing to what the gauges actually read. this can tell you quickly if one of the sensors is failing.
Then there are more insane scenarios where the contacts in the connector from the wiring harness to the compressor connector are corroded, causing intermittent cycling of the compressor. That one took a minute to solve.