OSAKA, Japan—President Trump and Chinese President Xi Jinping agreed to a cease-fire on trade that will remove some curbs on Huawei Technologies Co. buying high-tech equipment from the U.S., for the moment lifting one cloud over the global economy.

Under the cease-fire, the U.S. agreed to put off additional tariffs on Chinese goods indefinitely. In response, China will start buying large amounts of American farm products, Mr. Trump said.

Until...