Looks like the IAC sets itself. Requires driving at road speed, which closes the IAC port? ECM learns from that condition.
Other not so obvious could be throttle body butterfly isn't closing all the way due to cable, cruise control, carbon, or attempting to adjust the idle speed. The butterfly must shut at idle. The ECM sets idle speed...or tries to do so.
If the distributor was removed, it could be out of time, fuel pump failing, fuel pressure regulator, cracked spider...?
Some fuel related issues are slow to set codes.
If the truck ran OK when the exhaust was stock, and after changing the exhaust it ran poorly, think about what was dinked with during the install...? Wrong spark plugs, firing order (at plugs and cap), dist mistimed. Then undo any changes made while trying to make it run.
Check the idle vacuum, compression check, fuel pressure check, firing order verified, check the wiring near the headers for burnt wiring. Check for bad fuel pump ground and wiring. The fuel pump wiring is close to your driver side muffler...?
Is the fuel guage working properly?
The IAC is outside its map and is indicating it cannot compensate. Has the TPS been removed or adjusted?
I'm guessing that your truck did not have a post cat 02 sensor? If it did, it'll set a code indicating the sensor is out of range, but generally doesn't change the way it runs. L and R bank 02 sensors out of range will cause problems when warmed up. They'll also set codes quickly if heater çircuit has failed.
Still, if it ran before, very likely something is not quite as it was.
The most difficult problems to diagnose are often related to someone altering something before understanding the function and interaction. This is especially true on TBI and TPi systems.
Any good GM mechanic can plug your truck up and view the dynamics and tell what is the likely cause. Forget where I bought it, but had a Windows program for an OBD1, LT4 that showed all of the data, counts, and engine and trans temps. It didn't overwrite, but gave pages of data. The only problem was understanding what is being described. A good handheld scanner will do similar.