The advisers who remain could struggle to push Mr. Trump in a more free-market direction: Steven Mnuchin, the Treasury secretary, has shown little appetite for bucking the president on big issues. Kevin A. Hassett, the chairman of the Council of Economic Advisers, joined the administration several months in and does not appear to enjoy the profile within the White House that Mr. Cohn did.

Like Mr. Cohn, Mr. Mnuchin is a Goldman Sachs alum with roots in progressive enclaves such as New York City and Los Angeles who believes in free trade and a pro-business economic agenda. The two men worked closely together to shepherd the tax bill and Mr. Mnuchin often tries to be a moderating force, attempting to calm markets and smooth Mr. Trump’s provocative policy instincts.

But unlike Mr. Cohn, Mr. Mnuchin has not shown a willingness to publicly break with Mr. Trump and instead defends him. That tendency was on display this week when Mr. Mnuchin testified before Congress and insisted that he did not want to see a trade war. But when pressed about Mr. Trump’s controversial tariffs on steel and aluminum, Mr. Mnuchin said he was fully behind them. In an interview with Fox Business on Wednesday morning, he said he was confident the tariffs would not hurt economic growth, as many economists have warned.

“We’re comfortable that we’re going to manage through this so that it is not detrimental to our growth projections,” Mr. Mnuchin said.

Mr. Cohn’s departure comes amid the ascendence of advisers who have urged the president to take tougher action on trade. Peter Navarro, a trade skeptic who had been sidelined by Mr. Cohn, has been promised a promotion and made the rounds on Sunday talk shows to promote Mr. Trump’s trade policy. Commerce Secretary Wilbur Ross, who oversaw an investigation that led to the tariffs, succeeded in moving up the announcement even as Mr. Cohn sought to delay it. Robert Lighthizer, the United States trade representative, has become a trusted adviser to the president.

Those advisers have a much more binary view of trade, seeing it as a zero-sum game in which the United States is losing. They have pushed the president to withdraw from deals like Nafta unless trading partners agree to sharp concessions and to implement the type of stiff tariffs that he seems prepared to impose on steel and aluminum imports. Mr. Cohn has argued against some of the tougher positions that economists and businesses say could disrupt global supply chains, drive up costs for American businesses and hurt consumers.