The warning came as the Trump administration announced an agreement in principle with the Taliban in which 5,000 U.S. troops would leave in 135 days.