WASHINGTON — President Trump is projecting a steely facade as he prepares for a critical meeting on trade this weekend with President Xi Jinping of China. But behind his tough talk and threats of higher tariffs is a creeping anxiety about the costs of a prolonged trade war on the financial markets and the broader economy.

That could set the stage for a truce between the United States and China, several American officials said, in the form of an agreement that would delay new tariffs for several months while the world’s two largest economies try to work out the issues dividing them.

Such an outcome is not certain. Administration officials have expressed deep disappointment with China’s response to Mr. Trump’s pressure so far, characterizing it as a list of proposals, transmitted in Chinese, which they say would do little to curb China’s theft of American technology or address its other predatory trade practices.

But Mr. Trump has signaled a new willingness to make a deal with Mr. Xi, a leader he has treated solicitously and will meet over dinner on Saturday in Buenos Aires, after a summit meeting of leaders of the Group of 20 industrialized nations.