The Pentagon is prepared to remain in Iraq for as long as a decade despite an agreement between Washington and Baghdad that would bring all American troops home by 2012 , according to the US army chief of staff .