DUBAI, United Arab Emirates — The United States and Iran reached an initial agreement Monday that would extend their shaky ceasefire and lead to the reopening of the Strait of Hormuz, but significant challenges remain to ending the war, including whether Israel will continue its offensive in Lebanon. Details of the deal were not immediately released, but it appeared that it would not be implemented until it is signed, which mediator Pakistan said would happen Friday in Geneva.