But Republicans have been mostly enraged with Mr. Trump since the Oval Office meeting last week, where he sided with the Democratic leadership over his own party and his own Treasury secretary in favor of a December debt-ceiling vote. Mr. Ryan, who preferred a longer-term deal, had called such a three-month plan ridiculous.

Some Republicans have been concerned that the president, who has been pursuing more of a bipartisan patina as he struggles to secure major legislative achievements and his poll numbers sink over his handling of the racially charged violence in Charlottesville, Va., will go along with Democratic priorities.

A White House aide insisted that Mr. Trump had always left open the possibility of passing a DACA fix without funding for a border wall, and insisted that he had not moved away from the wall as a priority. During the Wednesday dinner, it was John F. Kelly, Mr. Trump’s chief of staff, who made the more detailed case for the wall, according to a person briefed on the discussion.



The wall was a key campaign pledge by Mr. Trump, but Democrats are vehemently against it.

Mr. Trump recently began to wind down DACA, which has provided protection from deportation for roughly 800,000 young undocumented immigrants. But he has been torn about it.

The president has sent conflicting signals about his intentions regarding the program, saying he would end it but urging Congress to come up with a legislative solution during the six-month wind-down period. But he has also told people he would revisit the issue after the six-month period if Congress did not act.

That would be a difficult task, since his own attorney general, Jeff Sessions, has declared DACA unconstitutional and an overreach of authority. It is not clear what mechanism Mr. Trump thinks he might have to put the program back in place through the executive branch.

At the White House earlier on Wednesday, Mr. Trump’s anti-immigration national policy adviser, Stephen Miller, told people that the administration would never allow a version of the replacement legislation, known as the Dream Act, to pass.