I have had different problems and could not figure it out ,
and some of the wounder full people on this site answered me and told me to checking the bcm fuses located under the hood top right corner , there s a 30 amp and a 4o amp that control every thing ,take them out check them ,change them
and take it from there .
this past weekend my next door neighbors cobalt was out of control with the motor it sounds like what you are having
so I took a chance and opened the hood took out the bcm fuses for a minute cleaned it check to see if every thing was ok put the fuses back started the car and the car went back to normal
hope this works
---------- Post added at 04:38 PM ---------- Previous post was at 04:32 PM ----------
I ITS THE TOP LEFT CORNER NOT THE RIGHT TOP CORNER OF THE FUSE BOX UNDER THE HOOD ,
GET TO KNOW YOUR FUSES OF THE CAR IN YOUR OWNERS MANUAL IT WILL ALSO HELP IN THE FUTURE ,
HOPE IT WILL HELP !