He has privately acknowledged that he cannot control the president and that his authority would be undermined if he tried and failed. Instead, he is intent on cosseting Mr. Trump with bureaucratic competence and forcing staff members to keep to their lanes, a challenge in an administration defined by tribal loyalties to power players like Mr. Kushner and Mr. Bannon.

“Several times I’ve been on phone conversations with the president over the last couple of days and General Kelly has been on those conversations as well,” Mick Mulvaney, the director of the Office of Management and Budget, told reporters on Thursday when asked if Mr. Kelly was making a mark.

The Trump White House is a judge-a-book-by-its-cover workplace, and staff members have been struck by Mr. Kelly’s bearing: tall, stern and commanding a respect Mr. Priebus never did. People close to Mr. Kelly said they expected him to methodically assess his new staff before making more drastic changes — and he has told people that he wants to improve morale before attacking the organizational chart.

Mr. Kelly has not been shy about letting Mr. Trump’s staff members know when they screwed up, ripping into West Wing aides during the chaos surrounding the president’s original travel ban when he was at the Department of Homeland Security. While he supported the broad policy goals, he was furious that he and his sprawling agency’s staff were caught off guard by a directive that was conceived and carried out by inexperienced aides in the White House, according to several longtime Trump advisers.

People close to Mr. Kelly said he also bristled repeatedly at efforts by Mr. Bannon and Stephen Miller, the president’s senior adviser, to install people they liked in his department. Mr. Kelly eventually won pitched battles over who would become director of Customs and Border Protection and head of the Secret Service, officials said. But Mr. Bannon has had a longstanding alliance with Mr. Kelly, supporting many of his other appointments.

In May, Mr. Kelly considered resigning after Mr. Trump’s firing of James B. Comey, the F.B.I. director, telling Mr. Comey in a phone call that he was thinking about doing so to protest the president’s actions, according to a former law enforcement official familiar with the conversation.

A senior White House official briefed on the exchange by Mr. Kelly said he never threatened to quit, but confirmed that he called Mr. Comey.