Subaru SRX starting issue

I have a 1999 Subaru SRX with 35000 miles. My issue is that when I start it in the morning or after a period of not driving it, it responds funny. It starts fine, but when I shift it into drive and I step on the gas, it wants to hesitate and if I don’t let off the gas it will stall. Now as soon as I let off the gas and immediately give it gas again it runs fine. I have had it looked at and of course it did not do it while at the dealership. I am trying to figure out what the problem could be. Hopefully you can give me some advice.

Imprezive

Is this a 2.2L?

Has a “check engine” light ever illuminated?

Has it ever back-fired?

You will probably need the help of a dealer, at least to check and see if your vehicle is subject to one of several Subaru Technical Service Bulletins pertaining to the 99 Impreza.

Some of these cars are subject to a “service campaign”. Others need replacement of the ECM (Engine Control Module) for hesitation problems, and still others have been found to have broken air intake chamber boxes.

I’d see if I could get somebody with access to Subaru TSBs to check your Vehicle Identification Number and engine I.D. against the list and see which ones if any apply.

CSA

The throttle position sensor contacts may be dirty.

Take it to an independent shop/mechanic. The dealer seems inept, and/or unwilling, to do any troubleshooting.
The throttle position sensor (tps) tells the engine computer (ECM), “Hey, Com, you need to send more fuel and air to the engine.” If the message is garbled, from the tps, the computer doesn’t know what to do.
It’s a fairly simple thing to check the voltage and ohms of the tps; which, among other things, a novice mechanic is expected to be able to do.