Peter Bergen is CNN's national security analyst, a vice president at New America and a professor of practice at Arizona State University. His new book is " Trump and His Generals: The Cost of Chaos ." The opinions expressed in this commentary are his own. View more opinion articles at CNN.

(CNN) For the moment the United States seems to have pulled back from a shooting war with Iran. The Iranians conducted limited strikes on American targets in Iraq Tuesday causing no casualties.

President Donald Trump then gave a somewhat conciliatory speech on Wednesday observing that, "Iran appears to be standing down, which is a good thing for all parties concerned and a very good thing for the world."

But given Trump's consistent inconsistency this is surely not the end of the story. The President's gyrations on the Middle East have been head-spinning and this week's developments are only the latest example.

Trump has gone back and forth on Iran, for instance: authorizing the drone strike that killed Iranian General Qasem Soleimani last week in Iraq, while also at the last minute calling off a military operation in June against targets in Iran, and then offering to sit down with the Iranians without preconditions.

Discussing Iran on Wednesday, Trump even bizarrely asked "NATO to become much more involved in the Middle East process. " Good luck with that! Trump unilaterally pulled out of the 2015 Iranian nuclear deal that was painstakingly negotiated along with three other key NATO member states -- the United Kingdom, France and Germany -- and he has berated many NATO countries for not spending enough of their GDP on defense. It's hard to imagine NATO countries queuing up to get involved in the Iran morass, which is largely of Trump's own making.

Trump's gyrations on Iran are similar to his reversals on Syria: Trump said that he would pull all American soldiers out of Syria on two occasions in the past year, only to reverse himself twice.

Similarly, Trump authorized peace talks with the Taliban, which he then abruptly terminated in September and he then reversed himself again in recent weeks, so those talks are now back on the table.

As a result of these myriad reversals, it's hard for both America's allies and enemies to discern any stable strategy in the greater Middle East.

At the same time, three years into his presidency President Donald Trump trusts himself to make the crucial military decisions while Trump's war cabinet is largely made up of men with scant experience about warfare or expertise in the Middle East, people who lack the standing and influence with Trump to keep him on a consistent course.

After he was elected, Trump -- the first president in history who had neither served in the US military nor held public office -- relied heavily on the military to supply his key national security officials.

Trump's pick for Secretary of Defense, retired Marine General Jim Mattis, had run Central Command (CENTCOM), which oversees all of America's wars in the greater Middle East.

Trump's National Security Adviser. H.R. McMaster had fought with distinction in the first Gulf War and in the Iraq War as well as serving a long tour in Afghanistan.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

General John Kelly, Trump's chief of staff, was Mattis' deputy when they led their Marines into Baghdad in 2003. Kelly later ran Southern Command (SOUTHCOM), which oversees all US military operations south of the US-Mexico border.

By the end of 2018 Kelly, Mattis, and McMaster were all gone because they were willing to disagree with Trump about matters of policy ranging from how to treat NATO allies, to how to best handle Vladimir Putin or how to best contain Iran.

Mattis wanted to stay in the 2015 Iranian nuclear deal negotiated by the Obama administration not only because Iran was sticking to the terms of the agreement but, as I found when I was reporting my new book "Trump and His Generals," because the deal had been negotiated together with close American allies—the British, French, and Germans. In Mattis's view, if the United States had made an agreement, you should stick to it.

Trump's replacements for Kelly, Mattis, and McMaster are in a different league than the generals who helped guide the first two years of the Trump administration. Mark Esper is Secretary of Defense, Mick Mulvaney is "acting" chief of staff and former hostage negotiator Robert O'Brien is national security adviser. Esper is a West Point graduate and served in the first Gulf War; he was on active duty for 10 years. Still, compared to their predecessors, they collectively have scant expertise in the Middle East or in running wars, and none of them have the experience or clout to challenge the commander in chief as their predecessors regularly did.

This has left Secretary of State Mike Pompeo, as the dominant voice in Trump's war cabinet. Pompeo has long been an Iran hawk, which seems to be in part because of his Christian fundamentalist views. Pompeo publicly said last year that it's possible that God sent Trump to protect Israel from the Iranian menace. God certainly works in mysterious ways.

Trump ran on a platform that he would get America out of its endless wars in the Middle East. Now he has plunged headlong into a conflict with Iran with consequences that no one can predict, including Trump himself.

Hold on to your horses. It's gonna be quite a ride.