Many of Mr. Trump’s top economic and legislative advisers disagreed with his decision to cut a deal with the Senate Democratic leader, Chuck Schumer of New York, and Representative Nancy Pelosi of California, the House Democratic leader. Some who opposed the deal tried to put a positive spin on it on Thursday by arguing that it gave a clear opening to work on the tax legislation.

“We’re very happy that we have a deal,” Treasury Secretary Steven Mnuchin said on the Fox Business Network. “I would say the best part about this is this clears out the next 90 days for us to focus on important things.”

Mr. Ryan said in June that his personal goal was to get tax reform done before deer hunting season, which begins before Thanksgiving, and he said he was still confident that it could be completed by the end of 2017.

“We want America to wake up on New Year’s Day 2018 with a new tax system,” Mr. Ryan said.

But more storms are coming and other legislative priorities are piling up. Mr. Trump’s decision earlier this week to end former President Barack Obama’s Deferred Action for Childhood Arrivals program gives Congress just six months to come up with a solution.

Mr. Ryan, who had urged Mr. Trump to maintain the program, said that he planned to introduce a “consensus plan” to the floor of the House in the coming months. That plan, he said, would deal with both border security and how to handle the children of undocumented immigrants who entered the country illegally.

“I think you can find a compromise,” Mr. Ryan said. “I think six months is enough time for us to figure it out.”