My z31 had always purred like a kitten, run flawlessly, and idled in spec. The morning after I replaced my thermostat a strange new problem appeared. When cold, the engine would start fine, run perfect for about 30 seconds to a minute, then stumble and hesitate so badly that I could barely keep her running. Then about a minute later she would run perfect again. Pulling out into traffic on my way to work suddenly became a real b*tch. I wondered if I caused a new problem while working on the car the day before or was this just a coincidence?
This problem happened every time during a cold start, with a definite "on and off" phenomenon which led me to believe that a sensor or solenoid was acting up. When changing out the thermostat I had inadvertently soaked the front of the engine with antifreeze while disconnecting the upper radiator hose from the thermostat housing. I figured a quick look under the hood couldn't hurt. I looked for any electrical connectors that would've gotten wet from the antifreeze.
Under the hood, near the front center top of the engine was this connector.
I didn't know exactly what I was looking at, but when I wiggled the connector at this sensor, it was crackly and sticky with dried antifreeze. I disconnected and cleaned the connector, sprayed it with WD-40, and reconnected it. The next morning's cold start was flawless. I found out later by looking in my factory service manual that this was the connector to the fuel temperature sensor. The car seemed back to normal until a few days later the cold start stumble returned, though not nearly as bad. After about a minute the car still ran perfectly. I searched on z31.com and the closest post I could find to my problem implicated a faulty exhaust gas recirculation (EGR) valve or solenoid.
This time I removed the vacuum line connecting the EGR solenoid on the right, to the EGR valve on the left. Then I capped both nipples (the cap is not on the solenoid in the pic, yet).
Car has run perfectly ever since. The EGR looks too hard to remove with the engine in the car, so for now it stays where it is, even though it is disconnected from its solenoid and not functioning.
I cannot explain exactly how these quick fixes solved my hesitation and rough running after a cold start, but the problem went away so I pass this info along in good faith.