But inside the White House, Mr. Trump’s aides wonder whether they are falling into a familiar pattern of endless negotiations with the North, which in the past has destroyed a few symbolic facilities but kept expanding its arsenal.

And at the same time, the president is now arguing that the clock is moving the other way in Iran. Mr. Trump is focusing on the nuclear program there with new urgency and threats of military action — even though it was his decision in May to withdraw from a deal that limited Iran’s nuclear capabilities for more than a decade.

The combination — flatter Mr. Kim, threaten the mullahs — comes straight from Mr. Trump, based on his negotiating approach as a New York developer, according to several current and former American diplomats and intelligence officials who spoke on the condition of anonymity.