That all depends, what is the actual code? How old are the sensors? What sometimes happens with old sensors is once the EEC is reset by flashing in a new program it causes failing sensors to start throwing CELs. How this works is that over time the sensors begin to ware out and start failing. The EEC has what is called adaptive memory. So as the sensor is failing the EEC is constantly adjusting the signals to compensate for the weakening of sensors. Then, once you flash in a new program or clear the memory by disconnecting the battery the EEC is reset to stock. So it now is receiving the weak signals from the sensors and sees that they are out of the specific parameter set in the EEC for stock and throws the CELs. In this case you will need to replace the front sensors. Fords don't like the Bosh sensors by the way. You should replace them with the factory units or NGKs.
Another thought is that the programming isn't correct. If you changed your MAF or went to a CAI and didn't tell AM then you could actually be running lean. A dirty MAF will also cause you to go lean. You clean them with MAF cleaner or a spray can of electronics cleaner. Do not touch the wires inside of the MAF, this is the actual sensor. You only spray the cleaner across the sensor and let it dry.
And the last cause could be that the programming is just wrong. AM doesn't have a very good rep with the rest of us custom tuners. I've had to fix up several of their customers with correct programs. They are what we call Internet Wholesalers, they sell in mass for cheap, with poor customer service after the sale.