The battery is weak and needs replaced. when the battery is weak the computer can forget how to idle.
Check master cylinder for fluid level Check around all wheels for a fluid leak or bad wheel cylinder The reason you can pump brake up without engine running is that you are emptying the vacuum reservoir and no longer have power (vacuum) assist
i had this happen to me it turned out to be a dead battery
Weak alternator?Check with a voltmeterWithout engine running and a good battery reading should be around 12.8 With engine running reading should be 13.8-14.2
check the motor mounts and tranny mount for being bad, also check your universal joints on the driveshaft.
the brake switch at the pedal is stuck or out of adjustment.
If it has a hydraulic clutch, it is probably the slave cylinder. You could still have pedal but the slave is letting the fluid past the seals. Have someone watch the slave while the clutch pedal is pushed.
Pedal pumps up fine, but when you run the engine, the brake booster applies more force to the lines. Thus compressing any air that may be in there. You will need to bleed the brakes more. I sometimes bleed the brakes with the engine running to correct this.
If the engine is running it is burning fuel, whether the gas pedal is pressed or not.
Throttle body has excess carbon build up or bad idle air control motor. Clean throttle body and/or test and replace AIC motor.
Disconnect the battery. Step on the brake pedal. Reconnect the battery.
Check the link out below.
open the battery compartment, remove old battery and replace it with a new one.