Negotiators had reached agreement on key issues despite Trump team’s idiosyncratic approach. Two days later, war began