Just because it's clicking the solenoid doesn't necessarily mean the issue isn't in the interlock circuit. More on that later. If it was a valve adjustment/compression release issue, the starter would attempt to crank and literally whine about the excessive load. The fact that it cranks normally on occasion would suggest that this is 100% an electrical issue.
Easiest diagnostic tool to see where the issue lies, is to connect a set of heavy jumper cables. One end on the engine block, the other directly to a cleaned up neg term on the battery. Try the key. If it cranks reliably, then move the jumper cable from the neg terminal on the battery to a clean bolt on the frame. If it still cranks right up, the issue is engine to frame grounding. If it goes back to being dilitary, then it's the battery to frame connection. If bypassing the normal grounding circuit doesn't change the behavior, move on to troubleshooting the positive side.
Use one end of your heavy jumpers on the big terminal on the starter (NOT the solenoid). Make sure it's got firm contact on the starter terminal, then connect the other end directly on the clean/bright battery positive terminal. Sparks will (briefly) fly, the engine should crank. If it does, then the issue lies either in the positive side pixie plumbing or in the interlock circuit. Now, use a smaller (16-10 AWG) jumper wire with alligator clips, one end on that B+ terminal, the other directly to the switch input (or trigger terminal) of the solenoid. If it cranks, then the issue is in the switch/interlock circuit.
Should the above procedure lead you to the interlock circuit, here's the scoop. Everywhere there is a connection, be it a wire terminal, or switch contact points, in the circuit, you have what is called "voltage drop". Just probing the circuit with a test light and a meter, solenoid disconnected, you may get 12+V everywhere and things look hunky dory. With no current flowing in the circuit, the voltage everywhere should match battery voltage. It's only when the system is engaged and moving current will the problem show up. Then you throw a big load on the system, like engine cranking, and your battery voltage drops 2-3V, there's 2-3+V of drop in the interlock and/or start circuit, and all of a sudden you don't have enough current flowing across the solenoid coil to keep it pulled in.
The resolution to excessive voltage drop in the interlock/start circuit will depend on how your Patriot is wired from the factory. Let me know if this turns out to be the issue. Hopefully you found the problem long before getting that far in.