Such uncertainty is standard in countries that lack a free press — I had a similar experience last year with Mr. Obama during his trip to Cuba, when even the White House did not know until it was underway whether President Raúl Castro would permit a question-and-answer period — but unusual for a democratic nation such as Poland.

Mr. Trump’s second foreign trip did bear some of the hallmarks of past presidential travels, however: He moved through the streets of Warsaw in the heavily armored limousine known as the Beast. And apart from the presidential press pool, which followed in a van in his motorcade, other reporters trailed in tour buses and were led around by young White House aides like schoolchildren on a heavily guarded field trip, our laminated credentials allowing us entry into heavily fortified stops on the president’s route.

Later in Hamburg, Germany, protesters with placards and riot police with water cannons clogged the streets at the Group of 20 summit of major world economies, making it difficult to get around. At one point, a press shuttle bus I was riding from the summit site stopped and armed guards boarded, one loading his Glock pistol loudly and saying, “Ready!” before we continued on our route. We were suitably intimidated.

Inside the hall, there was a different kind of tension. Reporters gathered in a nondescript room in the sprawling Hamburg Messe to await word from Mr. Trump’s meeting with President Vladimir V. Putin of Russia, scheduled to be a 30-minute affair. An hour in, word leaked that the United States and Russia, along with Jordan, had reached an agreement for a cease-fire in a part of southwestern Syria. I filed a quick story on the development and we continued waiting, calling and texting our sources to figure out if the meeting was still underway. It ultimately lasted more than two hours before Rex. W. Tillerson, the secretary of state, came out to give the customary “readout” of what had happened.

Things got more heated the next day when Chinese officials tried to exclude much of the White House press pool from a meeting between Mr. Trump and President Xi Jinping of China. I huddled along with the rest of the White House press pool — a group of five writers, four still photographers, a radio reporter and a television news crew that follows the president’s every move — in a hallway outside the meeting, being shoved and jostled by Chinese journalists as Mr. Trump’s and Mr. Xi’s aides exchanged angry words in English, Chinese and German.