Air conditioning problem in 2002 Alero

After my air conditioning has been running for a few minutes - anywhere from 3 to 10 minutes - the doors unlock and there is a clicking noise that you would hear if someone was manually clicking the locks open and closed. After a minute or so of this, the air conditioner stops putting out cool air. Air continues to blow but it is no longer cool.

This also happens when I use the heat but only if I have the knob positioned to blow air to the windshield. However, in this case, warm air does continue to blow but the locks unlock and there is the clicking noise.