The two examples the source gave:

In a private meeting last summer, Trump asked senior national security aides, including then-national security adviser H.R. McMaster, what would happen if the U.S. invaded Venezuela. The aides warned Trump against the idea, but he ended up blurting out publicly that he wasn’t ruling out a “military option” in Venezuela. (The AP first reported Trump’s private comments.)

For weeks earlier this year, Trump had been telling national security officials that Syria was a disaster and he wanted to withdraw U.S. troops ASAP. His aides, including Chief of Staff John Kelly, privately urged him not to say anything. When Trump traveled to Ohio for an infrastructure event in March, the text of his speech said nothing about foreign policy, according to a source with direct knowledge of the remarks. But Trump got up on stage and blurted out that the U.S. would be “coming out of Syria, like, very soon.”