lean code
My f150 with 5.4 auto has been throwing a lean code when I get low on fuel (under a 1/4 tank) I replaced a faulty O2 sensor cuz a wire was burnt but hasent happened for a long time till last night
sounds like your fuel pump is getting weak and isnt pushing enough fuel to the rail, also check to see if your fuel filter is getting nasty because that will cause a restriction in flow also.

