Hello and welcome to justanswer.com
Sounds like you have a vacuum leak. This will cause the idle problem as well as those codes. Those codes are for the oxygen sensors reading lean. You should check the PCV hose as they usually will collapse and leak. You can also spray some carb cleaner around the intake and listen for a change in engine rpm which indicates a leak.