An Action Replay (AR) that works "sometimes" is a classic hardware contact issue. The PS2's memory card slots (especially fat models) and the AR's own PCB age poorly. Follow this isolation guide to pinpoint the fault.
Many codes (infinite health, items) require: Activate code → Save game → Reload save for changes to stick. AR doesn't save its own state; it patches RAM only.
Bottom Line: 90% of "intermittent" AR issues are dirty contacts or a dying wall wart. Clean, verify power, test on another console. Then decide: replace AR or softmod the PS2.