At cold start, the cold start injector enriches the mixture for it to start. The fuel pump should only run about 2 seconds before starting. The solenoid click is an audible indication that the pump has been turned off, either due to elapsed time or setpoint pressure has been met. Whichever comes first.
The cold start injector is out of the loop when the engine is warm, so it sounds like you may not be getting enough fuel. Fuel injection engines are designed so that the accelerator doesn't need to be depressed during cranking like the old carburetor engines. Carburetors had accelerator pumps to squirt a small stream of fuel to enrich the mixture each time you depressed the pedal. The ECM takes care of that function, but with the engine warm, the Coolant Temperature Sensor is telling the ECM that it doesn't need the cold start injector's little squirt of fuel. I wouldn't think the ECM would enrich the mixture just based on a signal from the TPS. I think the TPS is also supposed to be out of the loop until a run signal is obtained from the ICM.
It could be a partially clogged fuel filter or weak fuel pump. When the engine is warm, try turning the ignition on and when you hear the relay click, turn it off for about 10 seconds then turn it back on to see if you hear the click again. I have done that on my 87, having to cycle it 3 or 4 times until I didn't hear the relay. That told me the system was up to pressure. Then it would start.