If it is simply throwing the codes but runs ok that does kind imply general electronic weirdness, and in a low voltage system reseating connectors and making sure everything is plugged in clean and dry is a good place to start. Cobalts have some issues with certain engine components depending on the year, model, etc.
I would pose this question on the internet and see if anybody has any idea of what it is. Some of the Cobalt forums especially.
You didn't give us much information about the situation with the Cobalt, model, miles, history, recent events.