I have some second hand experience with an 87 TPI motor which had similar issues. I poked around in the bin code and found a few things I think might explain what is happening.
First the idle speed control is a PID (Proportional Integral Differential) control loop. The thing about PID systems is they work phenominally well when tuned to the system. But if the system becomes untuned, the PID controller can oscillate and behave unpredictably.
One key variable in the idle circuit is un measured air (presuming mass air flow) entering the intake. A couple of key sources are PCV, and vacuum servo systems like brake boosters. If the engine developes too much blowby, or the motor's VE is changed (as in my friends case), or a significant leak exists in the vacuum system, oscillations can occurr. So check those things first.
The first step after varifying vacuum leaks, PCV, brake booster etc. is to calibrate the throttle position sensor and set curb idle. Get a manual which shows the procedure. There is also some general procedures in this or the engine forum. Much of what I learned about TPI engine control systems came from www.thirdgen.org
For my friends motor, his issues were primarily resulting from stroking the original 350 up to 383. He had to make all sorts of tweaks. His idle surging eventually required an ECM fireware adjustment. I'll ask what specifically he ended up changing. But unless your motor is modified, I suspect unmetered air flow is a prime contributor to your issue.