As a candidate, Donald Trump swaggered about how he’d order the military to do what he wanted. “They won’t refuse,” he said during a Republican debate, defending his call for the military to “take out” terrorists’ families. “They’re not gonna refuse me. Believe me.” He also claimed to have unique expertise. “I know more about ISIS than the generals do, believe me,” he said at a rally in Iowa. The U.S. missile strikes on a Syrian air base on Friday make clear a different reality: The Pentagon, not the White House, is playing the dominant role not just in military strategy, but in shaping foreign policy.

Trump’s campaign boasts were in keeping with the general cockiness of his ambitious foreign policy agenda, which promised to revive a radical “America first” nationalism and upend the internationalist consensus that has endured since World War II. Trump promised to tear up trade agreements like NAFTA, remake (and perhaps even end) alliances like NATO, foreswear regime change in the Middle East, and open up friendlier relations with Russia. This ambitious agenda is now in tatters, as Trump has caved in on issue after issue, giving in to the Republican foreign policy establishment.

The internal counterrevolution against Trump’s foreign policy agenda have been led by the generals, the very people Trump claimed to be smarter than. Secretary of Defense James Mattis and national security adviser H.R. McMaster (aided by White House Counsel Don McGahn) along with Joseph Dunford, the chairman of the Joint Chiefs of Staff, have successfully outmaneuvered the supporters of the “America first” agenda, notably former national security advisor Michael Flynn, who resigned in disgrace over lies about his Russia contacts, and senior adviser Steve Bannon, who was removed earlier this week from the principals committee of the National Security Council.

Bannon’s removal, seemingly pushed by McMaster, is the latest in a series of setbacks for Trump’s agenda. On Monday, Jared Kusher, the president’s son-in-law and perhaps his most influential adviser, made a surprise visit to Iraq, where Dunford had his ear. By Wednesday, Bannon was demoted amid widespread reports that his star was waning. The following day, Trump reversed his longstanding Syrian policy of turning a blind eye to the crimes of dictator Bashar al-Assad in the interest of fighting ISIS. Instead, Trump took up the very policy he had derided his rival Hillary Clinton of advocating: to punish Assad for human rights violations. “We should not be focusing on Syria,” Trump said in October. “You’re going to end up in World War Three over Syria if we listen to Hillary Clinton.”

What I am saying is stay out of Syria. — Donald J. Trump (@realDonaldTrump) September 4, 2013

Trump has come around not just to Clinton’s way of thinking, but, more significantly, the Pentagon’s way of thinking. President Barack Obama had long frustrated the national security establishment (encompassing senior leaders in the military and intelligence community, as well as the leading think tanks) by his reluctance to intervene in Syria. With Trump, the national security establishment has found a president who is much more pliable than Obama was. Obama had the strength of character and independence of mind to challenge the top military brass when he thought their policies were wrong. There’s no evidence that Trump has these qualities—quite the contrary.