The deal follows weeks of mixed messaging from both Washington and Tehran on the trajectory of the conflict.