stalling, low idle when air is on on 2005 Saturn Vue

vehicle is stalling when you turn the air on. had oxygen sensor code in it and we replaced it. has an electric throttle body.any answers would be appreciated my email is

Asked by for the 2005 Saturn Vue
What is an "oxygen sensor code"? What were the codes?
always lean but when we removed them they looked as if they were rich. yesterday we disconnected the battery for about an hour to see if anything changed. when we started and ran it everything seemed to be working fine idle went up when we turned air on and back down when we turned it back off. we turned it off and went back a few minutes later and it was back to stalling again.
You did not mention the actual codes; this could help us help you.

If they were lean codes, the sensors would look as if fuel was rich at the sensors. This is because you likely have a vacuum or air intake leak causing your lean codes, causing the processor to ask for more fuel.

A vacuum or air leak will cause a stall too. This is what I would focus on. I think the oxygen sensor replacement was unnecessary.