2012 Malibu starts then dies right away

My 2012 Malibu with 2.4L will start and then die almost imediately. I disconnected the battery for 30 seconds then the car starts right up. No warning lights come on. Replaced the battery and two days later back to the same thing. I disconnected the battery again and it starts and runs again. Any ideas?

If you’re sure it won’t start after simply waiting the time it takes you to do the battery dis/re-connect, I’d suspect the anti-theft system. Have you tried your other key?

Yes I have tried bot waiting and the second key. No luck with either.

Could be a lot of things, but my first guess is something wrong with the idle rpm control system. If it isn’t idling fast enough with the engine cold it will stall out. The relationship w/the battery could be that that system might be the self-learning type. With time and miles stuff gets clogged up so less air comes into the engine than when the car was new. So the computer adjusts for that, and remembers it for the next time you start the car. And when you disconnect the battery it goes back to how it was when the car was new. If all that isn’t working properly, this could be a symptom. On older cars it was done with a separate gadget called an idle air controller. So if you have that, give it a good cleanup. On newer cars it is done with the car’s drive by wire throttle control system.