A 'cat code' would be a PO720 or 721, catalyst efficiency code. Bad O2 sensors (mostly the downstream one) can set the same code.
A car that's been sitting a long time which on startup, has a crappy idle... I'm going to vote a gummy throttle body. ECMs will lose the memory of idle control if the battery goes dead. Fords and VWs were famous for that; the carbon and fuel residue accumulation in the TB and idle air control get rock hard, disconnect thbattery or let it go dead and the ECM has a hard time learning how to make it idle. Once engine heat softens the goo, it starts idling better. Scrub the TB and IAC with lots of carb cleaner and an old toothbrush, then fire it up and run it for a while.
The other possibility is a vacuum leak which will set not only cat codes and O2 codes but sometimes a PO101 mass air flow code. Vacuum leaks don't generally fix themselves, though. IIRC the MAF on that car is connected to the TB by the air intake hose, if it's cracked etc it will do that. Again, they don't generally fix themselves.
Another long shot: weirdo nonsensical codes and random crappy running on a DOHC engine can come from one cam having jumped time. How's the timing belt?