With Washington and Tehran each claiming victory, the agreement raised the prospect of some respite after nearly six weeks of bombing.