But Mr. Trump is also a showman who is intensely focused on pleasing the audience in front of him at the moment, a habit that some confidants believe has led to misunderstandings about what the president is actually willing to accept in any deal. He often leaves people with the impression that he agrees with them, stressing whatever position is convenient at the time.

Mark Krikorian, the executive director of the Center for Immigration Studies, a group that presses for less immigration, said Mr. Trump had maintained his tough line on the issue despite occasionally talking about a compromise.

“He seems to make commitments that he is not going to keep,” Mr. Krikorian said. “His inclinations are hawkish on immigration, but he seems to like to be agreeable to people and nod his head when he’s at a meeting and people are saying things, and try to make a deal.”

Mr. Krikorian said that he did not subscribe to the “Svengali theory” of the White House that cast Mr. Miller as a puppet master on immigration, but that it often fell to him and Mr. Kelly to explain the nuances of certain terms or proposals to a president unfamiliar with them. The chief of staff alluded to that dynamic in a closed-door meeting with Democratic lawmakers last week and later in an interview with Fox News, enraging Mr. Trump.

Immigration advocates hold a darker view.

“The president should trust his instincts and cut a deal,” said Kevin Appleby, the senior director of international migration policy at the Center for Migration Studies. “He is president and should not be the puppet of a few immigration restrictionist staffers, including his chief of staff. The perception is that they have total control over him, to the detriment of the nation.”