The larger problem, of course, is that Mr. Trump made a series of false or unsupported statements about a chaotic situation that has unfolded since he stood by as President Recep Tayyip Erdogan of Turkey advanced his forces into the area. In recent days, the vice president traveled to Turkey to negotiate a brief cease-fire — a nominal sacrifice from Mr. Erdogan that the White House has tried to frame as a win.

The quote Mr. Trump attributed to Mr. Esper could have come from a private conversation between them. But it appeared that it might have been a recounting — if not an entirely faithful one — of public comments made by Mr. Esper, who made an unannounced visit to meet with American troops in Afghanistan this weekend and delivered his own assessment of what was happening in Syria.

“I think overall the cease-fire generally seems to be holding,” Mr. Esper said, according to a Reuters correspondent traveling with him. “We see a stabilization of the lines, if you will, on the ground, and we do get reports of intermittent fires, this and that, that doesn’t surprise me necessarily.”

At the end of the tweet, Mr. Trump added two confusing elements of his own. The first was that United States had “secured the oil,” a claim he has repeatedly made in recent days without any explanation. The White House did not clarify what he meant by those remarks, and Mr. Trump has ignored the question when asked about it by reporters. Last year, there were about 2.5 billion barrels of oil in the fields in northern Syria, according to industry estimates.

The president also said that the United States was “bringing soldiers home,” which is also not correct, at least not in the short term: Mr. Esper has confirmed that the troops leaving Syria are heading to Iraq, to continue operations against the Islamic State.