Weakened or intermittent power to the compressor can result in weakened or intermittent function of the AC, when a relay is starting to fail. It is possible for the AC to function well in one instance and then shut off in another.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.