Stalling 97 Subaru legacy

after it warms up it stalls out. Either when it is slowing down or on the highway. The AIC motor has been replaced, new plugs and wires. It threw a Throttle valve sensor so that got replaced. Fuel filter is fine, Cat. is working. The parking lights now won’t shut off. Tried using the parking brake. Just pulled the fuse for now.you can definitely feel when it is going to shut off. It always restarts.

“The parking lights now won’t shut off”

While I don’t currently have a suggestion for your stalling problem, I believe that I do have the solution to the parking light problem.

On the top of the plastic cover that surrounds the steering column (just below the speedometer and other instruments), there is a toggle switch. When the switch is in its normal position, the parking lights will shut off when the ignition is shut off. When the switch is in its “activated” position, the parking lights stay on even when the ignition is shut off, as is necessary in some European locales.

Move the switch to its other position and your parking lights will turn off when the ignition is shut off.

I have to assume that you just bought this car, so that you are unfamiliar with this switch that sits directly in front of you while you drive. If you have had the car for a while, then I have to assume that you have never read the Owner’s Manual, which explains the function of this switch.

If you’re getting a ECM code P1507 (idle control system malfunction) MANUAL TRANS ONLY, Replace the “NEUTRAL SWITCH” located in the drivers side of the transmission. It’s a $25.00 part from the dealer. And relatively simple to replace.
If the check engine light is not coming on and the engine is stalling and/or less than responsive to the gas pedal movement, you might have a bad “AIR FLOW METER” located on the air filter housing. This is a common component failure that doesn’t set a code. New ones are $300.00-$500.00 recommend try a used one first.
If this fixes problem, recommend a new one since they are prone to failure.