Hi,
I think that my story might be useful for someone with the O2 sensor problems. Sorry if this is what's already well documented and known, but it was not in any of the repair manuals I saw.
a few weeks ago I've got a bunch of the O2 sensor error codes. And I was getting them every next day after I clear the codes. So? I was about to get a new sensor (it's ~$150 for my car) though I was a bit disappointed since I've replaced the sensor only about 45K miles ago.
....
Another thing that was weird were erratic starts.
....
One day, I left an inside light turned on through for ca. 8 hours and in the morning I could not start the car. "F^^^ ", I said. Then I jump started the car and get to the nearest "Autozone-like" store and got a new battery.
And ... surprisingly, NO O2 error codes anymore!

I have a few guesses, but I truly have no clue of what might be a relationship between a battery and an O2 sensor?