My AC on my honda civic 2006 works very well for the first 15 - 20 min after starting the car. Then the clutch starts engaging and disengaging frequently until eventually in about 10 min it completely disengages. If I tap the clutch with a pry bar or a long screw driver, it engages again. I checked the relay and it is fine. Can you please help my understand what could be the issue?
Possibly a weak clutch coil, whose windings have a high resistance that increases with temperature.
You might also verify the clutch gap is correct, and the engagement surfaces are free of rust. You may be able to move the rotor closer by removing or substituting washer shims under the rotor. This will help the situation for a while, but if the clutch coil is weak, it will eventually need replacement. It might be that the clutch surfaces are simply worn away, resulting in too large a gap. That would not be temperature dependent, however. For an '06 Civic, the gap should be 14 to 26 thousands of an inch.
Also verify the electrical connection to the clutch is clean and tight.
The other typical scenario is that the refrigerant level is low, which causes the pressure switch to disengage the system. Once disengaged, the high and low side pressures equalize and close the switch. However, I have not found this to be temperature dependent, and whacking on the clutch with the pressure switch open would not cause it to re-engage.
An easy way to distinguish is to monitor the voltage at the clutch to determine if the clutch still has power when it is disengaging.
Another easy test is to do a resistance check across the coil to determine if it is within limits - the numbers vary, but expect 3.1-3.5 ohms or so for a Honda. Anything higher (especially when hot) is a sign of a weak clutch.
There is also a thermal protection switch, and they do go bad, but you can't "whack" them to a cooler temperature.
My money is on the clutch coil.