Behind the scenes during a summer of crisis, however, Trump appears to pine for the days when the Oval Office was a bustling hub of visitors and gossip, over which he presided as impresario. He fumes that he does not get the credit he thinks he deserves from the media or the allegiance from fellow Republican leaders he says he is owed. He boasts about his presidency in superlatives, but confidants privately fret about his suddenly dark moods.

And some of Trump’s friends fear that the short-tempered president is on an inevitable collision course with White House Chief of Staff John F. Kelly.